52 lines
2.0 KiB
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
@extends('layouts.admin')
@section('title', $module->getName())
@section('content')
<!-- Default box -->
<div class="box box-success">
{!! Form::model($setting, [
'method' => 'PATCH',
2017-11-01 22:15:25 +03:00
'url' => ['settings/apps/' . $module->getAlias()],
2017-09-14 22:21:00 +03:00
'files' => true,
2018-09-17 13:57:03 +03:00
'role' => 'form',
'class' => 'form-loading-button'
2017-09-14 22:21:00 +03:00
]) !!}
<div class="box-body">
@foreach($module->get('settings') as $field)
@php $type = $field['type']; @endphp
@if (($type == 'textGroup') || ($type == 'emailGroup') || ($type == 'passwordGroup'))
{{ Form::$type($field['name'], trans($field['title']), $field['icon'], $field['attributes']) }}
@elseif ($type == 'textareaGroup')
{{ Form::$type($field['name'], trans($field['title'])) }}
@elseif ($type == 'selectGroup')
{{ Form::$type($field['name'], trans($field['title']), $field['icon'], $field['values'], $field['selected'], $field['attributes']) }}
@elseif ($type == 'radioGroup')
{{ Form::$type($field['name'], trans($field['title']), trans($field['enable']), trans($field['disable']), $field['attributes']) }}
@elseif ($type == 'checkboxGroup')
{{ Form::$type($field['name'], trans($field['title']), $field['items'], $field['value'], $field['id'], $field['attributes']) }}
@elseif ($type == 'fileGroup')
{{ Form::$type($field['name'], trans($field['title']), $field['attributes']) }}
@endif
@endforeach
</div>
<!-- /.box-body -->
<div class="box-footer">
{{ Form::saveButtons(URL::previous()) }}
</div>
<!-- /.box-footer -->
{!! Form::close() !!}
</div>
@endsection
2017-11-13 21:55:15 +03:00
@push('scripts')
2017-09-14 22:21:00 +03:00
<script type="text/javascript">
var text_yes = '{{ trans('general.yes') }}';
var text_no = '{{ trans('general.no') }}';
</script>
2017-11-13 21:55:15 +03:00
@endpush