This commit is contained in:
Ludovic CANDELLIER
2022-12-22 18:16:25 +01:00
parent a03befbf44
commit fd1ab5cf04
9 changed files with 111 additions and 30 deletions

View File

@@ -1,7 +1,21 @@
<input type="{{ $type ?? 'text'}}" name="{{ $name }}" id="{{ $id_name ?? str_slug($name,'-') }}" class="form-control {{ $class ?? ''}}" value="{{ $value ?? ''}}"
@if (isset($required) && $required)required="required"@endif
@if (isset($disabled) && $disabled)disabled="disabled"@endif
@if (isset($mask))data-inputmask="'mask': '{{ $mask }}'"@endif
@if (isset($placeholder))placeholder="{{ $placeholder }}"@endif
{{ $meta ?? ''}}
>
@include('components.form.label')
@if (($disabled ?? false) || ($readonly ?? false))
@include('components.form.input', ['type' => 'hidden', 'label' => false, 'disabled' => false, 'readonly' => false])
@endif
<input type="{{ $type ?? 'text'}}" name="{{ $name }}" id="{{ $id_name ?? str_slug($name,'-') }}" class="form-control {{ $class ?? ''}}" value="{{ $value ?? null}}"
@if ($required ?? false) required @endif
@if ($disabled ?? false) disabled @endif
@if ($readonly ?? false) readonly @endif
@if ($autofocus ?? false) autofocus @endif
@if ($size ?? false) size="{{ $size }}" @endif
@if ($autocomplete ?? false) autocomplete="{{ $autocomplete }}" @endif
@if ($minlength ?? false) minlength={{ $minlength }} @endif
@if ($maxlength ?? false) maxlength={{ $maxlength }} @endif
@if ($formid ?? false) form="{{ $formid }}" @endif
@if ($mask ?? false) data-inputmask="'mask': '{{ $mask }}'" @endif
@if ($pattern ?? false) pattern="{{ $pattern }}" @endif
@if ($placeholder ?? false) placeholder="{{ $placeholder }}" @endif
@if ($step ?? false) step="{{ $step }}" @endif
{!! $meta ?? '' !!} >

View File

@@ -0,0 +1,6 @@
@if ($label ?? false)
{{ Form::label($name ?? '', ucfirst($label) . (($required ?? false) ? ' *' : ''), [
'class' => ($classlabel ?? '')
]) }}
@if (!($horizontal ?? false))<br/>@endif
@endif