{{ Form::model($grouped_settings, ['route' => ['admin.settings.update'], 'method' => 'post']) }} @foreach($grouped_settings as $group => $settings)
@foreach($settings as $setting) @endforeach
{{ $group }}

{{ $setting->name }}

@component('admin.components.info') {{$setting->description}} @endcomponent

@if($setting->type === 'date') {{ Form::input('text', $setting->id, $setting->value, ['class' => 'form-control', 'id' => 'datepicker']) }} @elseif($setting->type === 'boolean' || $setting->type === 'bool') {{ Form::hidden($setting->id, 0) }} {{ Form::checkbox($setting->id, null, $setting->value) }} @elseif($setting->type === 'int') {{ Form::number($setting->id, $setting->value, ['class'=>'form-control']) }} @elseif($setting->type === 'number') {{ Form::number($setting->id, $setting->value, ['class'=>'form-control', 'step' => '0.01']) }} @elseif($setting->type === 'select') @if($setting->id === 'general_theme') {{ Form::select( $setting->id, list_to_assoc($themes), $setting->value, ['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) }} @elseif($setting->id === 'units_currency') {{ Form::select( $setting->id, $currencies, $setting->value, ['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) }} @else {{ Form::select( $setting->id, list_to_assoc(explode(',', $setting->options)), $setting->value, ['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) }} @endif @else {{ Form::input('text', $setting->id, $setting->value, ['class' => 'form-control']) }} @endif
{{--
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }} Cancel
--}}
@endforeach
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }} Cancel
{{ Form::close() }}