Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/resources/views/admin/tenants/create.blade.php
Назад
@extends('layouts.admin') @section('content') <div class="card"> <div class="card-header"> {{ trans('global.create') }} {{ trans('cruds.tenant.title_singular') }} </div> <div class="card-body"> <form method="POST" action="{{ route("admin.tenants.store") }}" enctype="multipart/form-data"> @csrf <div class="form-group"> <label class="required" for="name">{{ trans('cruds.tenant.fields.name') }}</label> <input class="form-control {{ $errors->has('name') ? 'is-invalid' : '' }}" type="text" name="name" id="name" value="{{ old('name', '') }}" required> @if($errors->has('name')) <span class="text-danger">{{ $errors->first('name') }}</span> @endif <span class="help-block">{{ trans('cruds.tenant.fields.name_helper') }}</span> </div> <div class="form-group"> <label class="required" for="email">{{ trans('cruds.tenant.fields.email') }}</label> <input class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}" type="email" name="email" id="email" value="{{ old('email') }}" required> @if($errors->has('email')) <span class="text-danger">{{ $errors->first('email') }}</span> @endif <span class="help-block">{{ trans('cruds.tenant.fields.email_helper') }}</span> </div> <div class="form-group"> <label for="phone">{{ trans('cruds.tenant.fields.phone') }}</label> <input class="form-control {{ $errors->has('phone') ? 'is-invalid' : '' }}" type="text" name="phone" id="phone" value="{{ old('phone', '') }}"> @if($errors->has('phone')) <span class="text-danger">{{ $errors->first('phone') }}</span> @endif <span class="help-block">{{ trans('cruds.tenant.fields.phone_helper') }}</span> </div> <div class="form-group"> <label for="profile_image">{{ trans('cruds.user.fields.profile_image') }}</label> <div class="needsclick dropzone {{ $errors->has('profile_image') ? 'is-invalid' : '' }}" id="profile_image-dropzone"> </div> @if($errors->has('profile_image')) <span class="text-danger">{{ $errors->first('profile_image') }}</span> @endif <span class="help-block">{{ trans('cruds.user.fields.profile_image_helper') }}</span> </div> <div class="form-group"> <label class="required" for="password">{{ trans('cruds.tenant.fields.password') }}</label> <input class="form-control {{ $errors->has('password') ? 'is-invalid' : '' }}" type="password" name="password" id="password" required> @if($errors->has('password')) <span class="text-danger">{{ $errors->first('password') }}</span> @endif <span class="help-block">{{ trans('cruds.tenant.fields.password_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.profileImageDropzone = { url: '{{ route('admin.users.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="profile_image"]').remove() $('form').append('<input type="hidden" name="profile_image" value="' + response.name + '">') }, removedfile: function (file) { file.previewElement.remove() if (file.status !== 'error') { $('form').find('input[name="profile_image"]').remove() this.options.maxFiles = this.options.maxFiles + 1 } }, init: function () { @if(isset($user) && $user->profile_image) var file = {!! json_encode($user->profile_image) !!} 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="profile_image" 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
|
Настройка