Файловый менеджер - Редактировать - /home/clickysoft/public_html/resources/views/admin/organizations/edit.blade.php
Назад
@extends('layouts.admin') @section('content') <div class="card"> <div class="card-header"> {{ trans('global.edit') }} {{ trans('cruds.organization.title_singular') }} </div> <div class="card-body"> <form method="POST" action="{{ route("admin.organizations.update", [$organization->id]) }}" enctype="multipart/form-data"> @method('PUT') @csrf <div class="form-group"> <label class="required" for="name">{{ trans('cruds.organization.fields.name') }}</label> <input class="form-control {{ $errors->has('name') ? 'is-invalid' : '' }}" type="text" name="name" id="name" value="{{ old('name', $organization->name) }}" required> @if($errors->has('name')) <span class="text-danger">{{ $errors->first('name') }}</span> @endif <span class="help-block">{{ trans('cruds.organization.fields.name_helper') }}</span> </div> <div class="form-group"> <label class="required" for="email">{{ trans('cruds.organization.fields.email') }}</label> <input class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}" type="email" name="email" id="email" value="{{ old('email', $organization->email) }}" required> @if($errors->has('email')) <span class="text-danger">{{ $errors->first('email') }}</span> @endif <span class="help-block">{{ trans('cruds.organization.fields.email_helper') }}</span> </div> <div class="form-group"> <label for="contact_number">{{ trans('cruds.organization.fields.contact_number') }}</label> <input class="form-control {{ $errors->has('contact_number') ? 'is-invalid' : '' }}" type="text" name="contact_number" id="contact_number" value="{{ old('contact_number', $organization->contact_number) }}"> @if($errors->has('contact_number')) <span class="text-danger">{{ $errors->first('contact_number') }}</span> @endif <span class="help-block">{{ trans('cruds.organization.fields.contact_number_helper') }}</span> </div> <div class="form-group"> <label for="address_line_1">{{ trans('cruds.organization.fields.address_line_1') }}</label> <input class="form-control {{ $errors->has('address_line_1') ? 'is-invalid' : '' }}" type="text" name="address_line_1" id="address_line_1" value="{{ old('address_line_1', $organization->address_line_1) }}"> @if($errors->has('address_line_1')) <span class="text-danger">{{ $errors->first('address_line_1') }}</span> @endif <span class="help-block">{{ trans('cruds.organization.fields.address_line_1_helper') }}</span> </div> <div class="form-group"> <label for="address_line_2">{{ trans('cruds.organization.fields.address_line_2') }}</label> <input class="form-control {{ $errors->has('address_line_2') ? 'is-invalid' : '' }}" type="text" name="address_line_2" id="address_line_2" value="{{ old('address_line_2', $organization->address_line_2) }}"> @if($errors->has('address_line_2')) <span class="text-danger">{{ $errors->first('address_line_2') }}</span> @endif <span class="help-block">{{ trans('cruds.organization.fields.address_line_2_helper') }}</span> </div> <div class="form-group"> <label for="logo">{{ trans('cruds.organization.fields.logo') }}</label> <div class="needsclick dropzone {{ $errors->has('logo') ? 'is-invalid' : '' }}" id="logo-dropzone"> </div> @if($errors->has('logo')) <span class="text-danger">{{ $errors->first('logo') }}</span> @endif <span class="help-block">{{ trans('cruds.organization.fields.logo_helper') }}</span> </div> <div class="form-group"> <label>{{ trans('cruds.organization.fields.status') }}</label> @foreach(App\Models\Organization::STATUS_RADIO as $key => $label) <div class="form-check {{ $errors->has('status') ? 'is-invalid' : '' }}"> <input class="form-check-input" type="radio" id="status_{{ $key }}" name="status" value="{{ $key }}" {{ old('status', $organization->status) === (string) $key ? 'checked' : '' }}> <label class="form-check-label" for="status_{{ $key }}">{{ $label }}</label> </div> @endforeach @if($errors->has('status')) <span class="text-danger">{{ $errors->first('status') }}</span> @endif <span class="help-block">{{ trans('cruds.organization.fields.status_helper') }}</span> </div> <div class="form-group"> <label class="required" for="date_expiration">{{ trans('cruds.organization.fields.date_expiration') }}</label> <input class="form-control date {{ $errors->has('date_expiration') ? 'is-invalid' : '' }}" type="text" name="date_expiration" id="date_expiration" value="{{ old('date_expiration', $organization->date_expiration) }}" required> @if($errors->has('date_expiration')) <span class="text-danger">{{ $errors->first('date_expiration') }}</span> @endif <span class="help-block">{{ trans('cruds.organization.fields.date_expiration_helper') }}</span> </div> <div class="form-group"> <button class="btn btn-danger" type="submit"> {{ trans('global.save') }} </button> </div> </form> </div> </div> @endsection @section('scripts') <script> Dropzone.options.logoDropzone = { url: '{{ route('admin.organizations.storeMedia') }}', maxFilesize: 2, // MB acceptedFiles: '.jpeg,.jpg,.png,.gif', maxFiles: 1, addRemoveLinks: true, headers: { 'X-CSRF-TOKEN': "{{ csrf_token() }}" }, params: { size: 2, width: 4096, height: 4096 }, success: function (file, response) { $('form').find('input[name="logo"]').remove() $('form').append('<input type="hidden" name="logo" value="' + response.name + '">') }, removedfile: function (file) { file.previewElement.remove() if (file.status !== 'error') { $('form').find('input[name="logo"]').remove() this.options.maxFiles = this.options.maxFiles + 1 } }, init: function () { @if(isset($organization) && $organization->logo) var file = {!! json_encode($organization->logo) !!} this.options.addedfile.call(this, file) this.options.thumbnail.call(this, file, file.preview ?? file.preview_url) file.previewElement.classList.add('dz-complete') $('form').append('<input type="hidden" name="logo" value="' + file.file_name + '">') this.options.maxFiles = this.options.maxFiles - 1 @endif }, error: function (file, response) { if ($.type(response) === 'string') { var message = response //dropzone sends it's own error messages in string } else { var message = response.errors.file } file.previewElement.classList.add('dz-error') _ref = file.previewElement.querySelectorAll('[data-dz-errormessage]') _results = [] for (_i = 0, _len = _ref.length; _i < _len; _i++) { node = _ref[_i] _results.push(node.textContent = message) } return _results } } </script> @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка