2017-09-14 22:21:00 +03:00
|
|
|
@extends('layouts.admin')
|
|
|
|
|
|
|
|
@section('title', $module->getName())
|
|
|
|
|
|
|
|
@section('content')
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="card">
|
2017-09-14 22:21:00 +03:00
|
|
|
{!! Form::model($setting, [
|
2019-11-16 10:21:14 +03:00
|
|
|
'id' => 'module',
|
2017-09-14 22:21:00 +03:00
|
|
|
'method' => 'PATCH',
|
2019-11-16 10:21:14 +03:00
|
|
|
'url' => ['settings/' . $module->getAlias()],
|
|
|
|
'@submit.prevent' => 'onSubmit',
|
|
|
|
'@keydown' => 'form.errors.clear($event.target.name)',
|
2017-09-14 22:21:00 +03:00
|
|
|
'files' => true,
|
2018-09-17 13:57:03 +03:00
|
|
|
'role' => 'form',
|
2019-11-16 10:21:14 +03:00
|
|
|
'class' => 'form-loading-button',
|
|
|
|
'novalidate' => true
|
2017-09-14 22:21:00 +03:00
|
|
|
]) !!}
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="card-body">
|
|
|
|
<div class="row">
|
|
|
|
@foreach($module->get('settings') as $field)
|
|
|
|
@php $type = $field['type']; @endphp
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
@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')
|
2019-12-24 13:49:59 +03:00
|
|
|
{{ Form::$type($field['name'], trans($field['title']), $setting[$field['name']], trans($field['enable']), trans($field['disable']), $field['attributes']) }}
|
2019-11-16 10:21:14 +03:00
|
|
|
@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
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
{{ Form::hidden('module_alias', $module->getAlias(), ['id' => 'module_alias']) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="card-footer">
|
|
|
|
<div class="float-right">
|
|
|
|
<div class="row">
|
|
|
|
{{ Form::saveButtons(URL::previous()) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-09-14 22:21:00 +03:00
|
|
|
{!! Form::close() !!}
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
@push('scripts_start')
|
|
|
|
<script src="{{ asset('public/js/settings/modules.js?v=' . version('short')) }}"></script>
|
2017-11-13 21:55:15 +03:00
|
|
|
@endpush
|