2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::model($grouped_settings, ['route' => ['admin.settings.update'], 'method' => 'post']) }}
|
2017-12-31 00:38:18 +08:00
|
|
|
@foreach($grouped_settings as $group => $settings)
|
2018-02-27 10:23:48 +08:00
|
|
|
<div class="card border-blue-bottom">
|
2017-12-31 00:38:18 +08:00
|
|
|
<div class="content table-responsive table-full-width">
|
|
|
|
<table class="table table-hover" id="flights-table">
|
|
|
|
<thead>
|
|
|
|
<th colspan="2">
|
2018-03-13 06:58:12 +08:00
|
|
|
<h5>{{ $group }}</h5>
|
2017-12-31 00:38:18 +08:00
|
|
|
</th>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
@foreach($settings as $setting)
|
|
|
|
<tr>
|
2017-12-31 02:03:45 +08:00
|
|
|
<td width="70%">
|
2018-03-13 06:58:12 +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')
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ 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')
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::hidden($setting->id, 0) }}
|
|
|
|
{{ Form::checkbox($setting->id, null, $setting->value) }}
|
2019-08-07 03:54:21 +08:00
|
|
|
@elseif($setting->type === 'int')
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::number($setting->id, $setting->value, ['class'=>'form-control']) }}
|
2019-08-07 03:54:21 +08:00
|
|
|
@elseif($setting->type === 'number')
|
|
|
|
{{ Form::number($setting->id, $setting->value, ['class'=>'form-control', 'step' => '0.01']) }}
|
2017-12-31 00:38:18 +08:00
|
|
|
@elseif($setting->type === 'select')
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::select(
|
2018-01-22 02:36:03 +08:00
|
|
|
$setting->id,
|
|
|
|
list_to_assoc(explode(',', $setting->options)),
|
|
|
|
$setting->value,
|
2018-03-13 06:58:12 +08:00
|
|
|
['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) }}
|
2017-12-31 00:38:18 +08:00
|
|
|
@else
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::input('text', $setting->id, $setting->value, ['class' => 'form-control']) }}
|
2017-12-31 00:38:18 +08:00
|
|
|
@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-03-13 06:58:12 +08:00
|
|
|
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
|
|
|
<a href="{{ route('admin.subfleets.index') }}" class="btn btn-default">Cancel</a>
|
2017-12-31 02:03:45 +08:00
|
|
|
</div>
|
2017-12-31 00:38:18 +08:00
|
|
|
</div>
|
2017-12-31 02:03:45 +08:00
|
|
|
</div>
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::close() }}
|
2017-12-31 02:03:45 +08:00
|
|
|
<script>
|
|
|
|
$(document).ready(function () {
|
|
|
|
$('#datepicker').datetimepicker({
|
|
|
|
format: "YYYY-MM-DD"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|