2020-07-15 05:48:49 +00:00
|
|
|
@extends('adminlte::page')
|
|
|
|
|
|
|
|
@section('title', 'Raspberry Network | Edit From')
|
|
|
|
|
|
|
|
@section('content_header')
|
|
|
|
|
2020-09-01 11:43:39 +00:00
|
|
|
<h4>{{__('messages.adm')}} / {{__('messages.forms')}} / {{__('messages.edt')}}</h4>
|
2020-07-15 05:48:49 +00:00
|
|
|
|
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('js')
|
|
|
|
|
|
|
|
<script src="/js/formeditor.js"></script>
|
|
|
|
<x-global-errors></x-global-errors>
|
|
|
|
|
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
<div class="row mb-5">
|
|
|
|
<div class="col">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col text-center">
|
|
|
|
|
|
|
|
<img src="/img/editor.svg" width="250px" alt="Editor illustration" class="img-responsive" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col">
|
|
|
|
|
|
|
|
<form id="editForm" method="POST" action="{{ route('updateForm', ['form' => $formID]) }}">
|
|
|
|
@csrf
|
|
|
|
@method('PATCH')
|
|
|
|
<div class="card">
|
|
|
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
2020-09-01 11:43:39 +00:00
|
|
|
<h4>{{__('messages.edt_action')}} {{ $title }}...</h4>
|
2020-07-15 05:48:49 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
|
|
|
@foreach($formStructure['fields'] as $fieldName => $field)
|
|
|
|
|
|
|
|
<div class="form-group mt-4 mb-4">
|
|
|
|
|
|
|
|
<input autocomplete="false" type="text" id="{{ $fieldName }}" class="form-control" name="{{ $fieldName }}[]" value="{{ $field['title'] }}" />
|
|
|
|
|
|
|
|
<select class="custom-select" id="{{ $fieldName }}-type" name="{{ $fieldName }}[]">
|
|
|
|
|
2020-09-01 11:43:39 +00:00
|
|
|
<option value="nil" disabled>{{__('messages.field_type')}}</option>
|
|
|
|
<option value="textbox" {{ ($field['type'] == 'textbox' ? 'selected' : '') }}>{{__('messages.txtbox')}}</option>
|
|
|
|
<option value="textarea" {{ ($field['type'] == 'textarea' ? 'selected' : '') }}>{{__('messages.multiline')}}</option>
|
|
|
|
<option value="checkbox" {{ ($field['type'] == 'checkbox' ? 'selected' : '') }}>{{__('messages.checkbox')}}</option>
|
2020-07-15 05:48:49 +00:00
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
<div class="field-container mt-4 mb-4">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-footer text-center">
|
|
|
|
|
2020-09-01 11:43:39 +00:00
|
|
|
<button type="button" class="btn btn-warning ml-2" onclick="$('#editForm').submit()"><i class="fas fa-save"></i> {{__('messages.save_exit')}}</button>
|
|
|
|
<button type="button" class="btn btn-primary ml-2" id="add"><i class="fas fa-plus"></i> {{__('messages.new_field')}}</button>
|
2020-07-15 05:48:49 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@stop
|
2020-07-16 05:46:20 +00:00
|
|
|
|
|
|
|
@section('footer')
|
|
|
|
@include('breadcrumbs.dashboard.footer')
|
|
|
|
@stop
|