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)
|
2019-10-30 21:05:18 +08:00
|
|
|
<div class="card border-blue-bottom">
|
2020-02-19 06:10:31 +08:00
|
|
|
<div class="content table-responsive">
|
2020-02-13 07:28:11 +08:00
|
|
|
<div class="row">
|
|
|
|
<table class="table table-hover" id="flights-table">
|
|
|
|
<thead>
|
|
|
|
<th colspan="2">
|
|
|
|
<h5>{{ $group }}</h5>
|
|
|
|
</th>
|
|
|
|
</thead>
|
2017-12-31 00:38:18 +08:00
|
|
|
|
2020-02-13 07:28:11 +08:00
|
|
|
@foreach($settings as $setting)
|
|
|
|
<tr>
|
|
|
|
<td width="70%">
|
|
|
|
<p>{{ $setting->name }}</p>
|
|
|
|
<p class="description">
|
|
|
|
@component('admin.components.info')
|
|
|
|
{{$setting->description}}
|
|
|
|
@endcomponent
|
|
|
|
</p></td>
|
|
|
|
<td align="center">
|
|
|
|
@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')
|
2017-12-31 00:38:18 +08:00
|
|
|
|
2020-02-13 07:28:11 +08:00
|
|
|
@if($setting->id === 'general_theme')
|
|
|
|
{{ Form::select(
|
2019-10-30 21:05:18 +08:00
|
|
|
$setting->id,
|
2020-02-13 07:28:11 +08:00
|
|
|
list_to_assoc($themes),
|
|
|
|
$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']) }}
|
2019-10-30 21:05:18 +08:00
|
|
|
@endif
|
|
|
|
|
2020-02-13 07:28:11 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{--<div class="row">
|
|
|
|
<div class="col-sm-12 text-right">
|
|
|
|
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
|
|
|
<a href="{{ route('admin.subfleets.index') }}" class="btn btn-default">Cancel</a>
|
|
|
|
</div>
|
|
|
|
</div>--}}
|
|
|
|
|
2017-12-31 00:38:18 +08:00
|
|
|
</div>
|
2019-10-30 21:05:18 +08:00
|
|
|
</div>
|
2017-06-21 07:49:45 +08:00
|
|
|
@endforeach
|
2020-02-13 07:28:11 +08:00
|
|
|
|
2017-12-31 02:03:45 +08:00
|
|
|
<div class="card">
|
2019-10-30 21:05:18 +08:00
|
|
|
<div class="content">
|
2020-02-13 07:28:11 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12 text-right">
|
|
|
|
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
|
|
|
<a href="{{ route('admin.subfleets.index') }}" class="btn btn-default">Cancel</a>
|
|
|
|
</div>
|
2017-12-31 00:38:18 +08:00
|
|
|
</div>
|
2019-10-30 21:05:18 +08:00
|
|
|
</div>
|
2017-12-31 02:03:45 +08:00
|
|
|
</div>
|
2020-02-13 07:28:11 +08:00
|
|
|
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::close() }}
|
2020-02-19 06:10:31 +08:00
|
|
|
|
2017-12-31 02:03:45 +08:00
|
|
|
<script>
|
2019-10-30 21:05:18 +08:00
|
|
|
$(document).ready(function () {
|
2017-12-31 02:03:45 +08:00
|
|
|
$('#datepicker').datetimepicker({
|
2019-10-30 21:05:18 +08:00
|
|
|
format: "YYYY-MM-DD"
|
2017-12-31 02:03:45 +08:00
|
|
|
});
|
2019-10-30 21:05:18 +08:00
|
|
|
});
|
2017-12-31 02:03:45 +08:00
|
|
|
</script>
|