@php if ( Ui::keyset($attributes, 'layout') == null || (Ui::keyset($attributes, 'layout') != null && $attributes['layout'] == 'h') ) { $horizental = true; $row = ' row'; $labelClass = 'col-2 col-form-label'; } else { $horizental = false; $row = ''; $labelClass = 'col-form-label'; } if (Ui::keyset($attributes, 'autocomplete') != null) { $typeaheadClass = 'typeahead'; } else { $typeaheadClass = ''; } if (isset($attributes['required']) && $attributes['required'] === true) { $labelClass .= ' required'; } if (isset($attributes['required']) && $attributes['required'] === true) { $labelClass .= ' required'; } @endphp
{{ Form::label($name, Ui::prettify(__('ui.' . $name)), ['class' => $labelClass]) }} @if ($horizental)
@endif @if (isset($attributes) && is_array($attributes) && isset($attributes['input_type']) && $attributes['input_type'] == 'number') {{ Form::number($name, $value, array_merge(['class' => 'form-control'], $attributes)) }} @elseif(isset($attributes) && is_array($attributes) && isset($attributes['input_type']) && $attributes['input_type'] == 'date') {{ Form::date($name, $value, array_merge(['class' => 'form-control'], $attributes)) }} @elseif(isset($attributes) && is_array($attributes) && isset($attributes['input_type']) && $attributes['input_type'] == 'datetime') {{ Form::input('dateTime-local', $name, $value, array_merge(['class' => 'form-control'], $attributes)) }} @elseif(isset($attributes) && is_array($attributes) && isset($attributes['input_type']) && $attributes['input_type'] == 'time') {{ Form::time($name, $value, array_merge(['class' => 'form-control'], $attributes)) }} @elseif(isset($attributes) && is_array($attributes) && isset($attributes['input_type']) && $attributes['input_type'] == 'color')
{{ Form::color('', $value, array_merge(['id' => 'colorInput' . $name, 'class' => 'form-control form-control-color'], $attributes)) }}
{{ Form::text($name, $value, array_merge(['class' => 'form-control', 'id' => 'hexInput' . $name, 'maxlength' => '7'], $attributes)) }}
@else {{ Form::text($name, $value, array_merge(['class' => 'form-control'], $attributes)) }} @endif @if ($horizental)
@endif
@if (Ui::keyset($attributes, 'autocomplete') != null) @endif @if (isset($attributes) && is_array($attributes) && isset($attributes['input_type']) && $attributes['input_type'] == 'color') @endif