ldc-supportweb/resources/views/bo/partials/inputs/int-number.blade.php
2023-08-14 09:23:39 +00:00

44 lines
1.1 KiB
PHP

@if(!empty($label))
<label for="{{ $id }}" class="col-form-label">
<b>{{ $label }} {{ $required ? '*' : '' }}</b>
</label>
@endif
@if(isset($appendText))
<div class="input-group">
@endif
<input id="{{ $id }}"
name="{{ $name }}"
type="number"
value="{{ Str::replace(',', '.', strval(old($name, $value ?? $model->{$name} ?? 0))) }}"
class="form-control"
aria-describedby="{{ $id }}Help"
@if(!empty($step))
step="{{ Str::replace(',', '.', strval($step)) }}"
@else
step="1"
@endif
@if(!empty($max))
max="{{ $max }}"
@else
max="{{ !empty($unsigned) ? '4294967295' : '2147483647' }}"
@endif
@if(!empty($min))
min="{{ $min }}"
@else
min="{{ !empty($unsigned) ? '0' : '-2147483648' }}"
@endif
@if(!empty($placeholder))
placeholder="{{ $placeholder }}"
@endif
@if(!empty($required))
required
@endif>
@if(isset($appendText))
<label class="input-group-text">{{ $appendText }}</label>
@endif
</div>
@include('modules.input-error', [
'inputName' => $name,
'helperId' => '{{ $id }}Help',
'helper' => $helper
])