2017-12-31 00:38:18 +08:00
|
|
|
{!! Form::model($grouped_settings, ['route' => ['admin.settings.update'], 'method' => 'post']) !!}
|
|
|
|
@foreach($grouped_settings as $group => $settings)
|
|
|
|
<div class="card">
|
|
|
|
<div class="content table-responsive table-full-width">
|
|
|
|
<table class="table table-hover" id="flights-table">
|
|
|
|
<thead>
|
|
|
|
<th colspan="2">
|
|
|
|
<h5>{!! $group !!}</h5>
|
|
|
|
</th>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
@foreach($settings as $setting)
|
|
|
|
<tr>
|
2017-12-31 02:03:45 +08:00
|
|
|
<td width="70%">
|
2017-12-31 00:38:18 +08:00
|
|
|
<p>{!! $setting->name !!}</p>
|
2018-02-27 05:16:12 +08:00
|
|
|
<p class="description">
|
|
|
|
@component('admin.components.info')
|
|
|
|
{{$setting->description}}
|
|
|
|
@endcomponent
|
|
|
|
</p></td>
|
2017-12-31 02:03:45 +08:00
|
|
|
<td align="center">
|
|
|
|
@if($setting->type === 'date')
|
|
|
|
{!! Form::input('text', $setting->id, $setting->value, ['class' => 'form-control', 'id' => 'datepicker']) !!}
|
2017-12-31 00:38:18 +08:00
|
|
|
@elseif($setting->type === 'boolean' || $setting->type === 'bool')
|
|
|
|
{!! Form::hidden($setting->id, 0) !!}
|
2017-12-31 02:03:45 +08:00
|
|
|
{!! Form::checkbox($setting->id, null, $setting->value) !!}
|
2017-12-31 00:38:18 +08:00
|
|
|
@elseif($setting->type === 'int' || $setting->type === 'number')
|
|
|
|
{!! Form::number($setting->id, $setting->value, ['class'=>'form-control']) !!}
|
|
|
|
@elseif($setting->type === 'select')
|
2018-01-22 02:36:03 +08:00
|
|
|
{!! Form::select(
|
|
|
|
$setting->id,
|
|
|
|
list_to_assoc(explode(',', $setting->options)),
|
|
|
|
$setting->value,
|
|
|
|
['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) !!}
|
2017-12-31 00:38:18 +08:00
|
|
|
@else
|
|
|
|
{!! Form::input('text', $setting->id, $setting->value, ['class' => 'form-control']) !!}
|
|
|
|
@endif
|
|
|
|
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-06-21 07:49:45 +08:00
|
|
|
@endforeach
|
2017-12-31 02:03:45 +08:00
|
|
|
<div class="card">
|
|
|
|
<div class="content">
|
|
|
|
<div class="text-right">
|
2018-01-04 02:52:01 +08:00
|
|
|
{!! Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) !!}
|
2017-12-31 02:03:45 +08:00
|
|
|
<a href="{!! route('admin.subfleets.index') !!}" class="btn btn-default">Cancel</a>
|
|
|
|
</div>
|
2017-12-31 00:38:18 +08:00
|
|
|
</div>
|
2017-12-31 02:03:45 +08:00
|
|
|
</div>
|
2017-12-31 00:38:18 +08:00
|
|
|
{!! Form::close() !!}
|
2017-12-31 02:03:45 +08:00
|
|
|
<script>
|
|
|
|
$(document).ready(function () {
|
|
|
|
$('#datepicker').datetimepicker({
|
|
|
|
format: "YYYY-MM-DD"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|