ldc-portsalaries/resources/views/crud/formfields/int.blade.php
Jérémy Munsch ed81e31e09 - Fix sites select on users
- add users policy
- correct readonly handle on crud
- crud readonly callback support
- crud readonly for belongsTo and belongsToMany
2021-06-07 18:29:02 +02:00

18 lines
789 B
PHP

<td>
<label for="{{ $fieldName }}" class="form-label">{{ $prop['label'] }}</label>
</td>
<td>
<input
id="{{ $fieldName }}"
class="form-control"
name="{{ $fieldName }}"
type="number"
placeholder="{{ $prop['rules']['min'] }}"
value="{{ old($fieldName) ?? $model->{$fieldName} ?? $prop['rules']['min'] }}"
@if(isset($prop['rules']['max']))max="{{ $prop['rules']['max'] }}"@endif
@if(isset($prop['rules']['min']))min="{{ $prop['rules']['min'] }}"@endif
@if(isset($prop['rules']['step']))step="{{ $prop['rules']['step'] }}"@endif
@if($prop['disabled'])disabled @endif
@if($readonly)readonly @endif
@if($prop['required'] or (!$prop['required'] and !$prop['nullable']))required @endif>
</td>