Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/resources/views/profile/edit.blade.php
Назад
@extends('profile.app') @section('content') <div class="col-md-12 col-lg-12 col-xl-9"> <div class="row"> <div class="col-md-12"> <div class="edf-cancel"> <div class="mod-heads "> <h3> My Profile </h3> <p>Access, manage, and personalize your account details all in one place </p> </div> <div class="edit-cancel-button"> <button type="button" class="cancel-btn"> Cancel </button> <button class="edit-btn"> Edit Profile </button> </div> </div> </div> {{-- @if ($errors->any()) @foreach ($errors->all() as $error) <label class="row justify-content-center custom_error">{{ $error }}</label> @endforeach @endif --}} <div class="col-md-12 col-lg-7"> <form action="{{ route('update.profile') }}" id="profile_edit_form" method="POST" enctype="multipart/form-data"> @csrf <div class="profile-upload-wrapper"> <div class="avatar-upload"> {{-- <form action=""> --}} <p class="photo-text">Photo</p> <input type='file' id="imageUpload" accept=".png, .jpg, .jpeg" name="profile_image" value=""/> <div class="avatar-preview"> <div id="imagePreview" style="background-image:url('{{ !empty($user->getMedia('profile_image')->first())? $user->getMedia('profile_image')->first()->getUrl(): '/images/dummy-upload.png' }}')"> </div> <div class="hover-upload"><label for="imageUpload"><svg xmlns="http://www.w3.org/2000/svg" width="41" height="33" viewBox="0 0 41 33" fill="none"> <path d="M20.2716 12.7387C16.9844 12.7387 14.3202 15.4042 14.3202 18.6901C14.3202 21.9773 16.9844 24.6415 20.2716 24.6415C23.558 24.6415 26.223 21.9773 26.223 18.6901C26.223 15.4042 23.558 12.7387 20.2716 12.7387ZM36.142 6.78734H31.3809C30.7262 6.78734 30.0208 6.27949 29.8141 5.65816L28.5833 1.96472C28.3758 1.34379 27.6712 0.835938 27.0165 0.835938H13.5267C12.872 0.835938 12.1666 1.34379 11.9599 1.96512L10.7291 5.65856C10.5216 6.27949 9.81697 6.78734 9.16232 6.78734H4.4012C2.21901 6.78734 0.433594 8.57276 0.433594 10.7549V28.6091C0.433594 30.7913 2.21901 32.5768 4.4012 32.5768H36.142C38.3242 32.5768 40.1096 30.7913 40.1096 28.6091V10.7549C40.1096 8.57276 38.3242 6.78734 36.142 6.78734ZM20.2716 28.6091C14.7935 28.6091 10.3526 24.1682 10.3526 18.6901C10.3526 13.2125 14.7935 8.77114 20.2716 8.77114C25.7489 8.77114 30.1906 13.2125 30.1906 18.6901C30.1906 24.1682 25.7489 28.6091 20.2716 28.6091ZM34.7533 13.5295C33.9868 13.5295 33.3647 12.9082 33.3647 12.1408C33.3647 11.3743 33.9868 10.7522 34.7533 10.7522C35.5207 10.7522 36.142 11.3743 36.142 12.1408C36.142 12.9082 35.5203 13.5295 34.7533 13.5295Z" fill="white" /> </svg></label></div> </div> {{-- <label id="fileSizeError" class="error"></label> --}} {{-- </form> --}} {{-- <div class="three-dots"> <p> <span class="th-dots"></span><span class="th-dots"></span> <span class="th-dots"></span> </p> </div> --}} </div> <p class="note-upload">The uploaded image must be max 3 MB</p> </div> <div class="profile-fields-main"> <div class="profile-fields"> <label for="">Name<span>*</span></label> <input type="text" {{ $errors->any() ? '' : 'disabled' }} value="{{ old('name', $user->name) }}" placeholder="Name" name="name" required> @error('name') <span class="text-danger" id="name-error">{{ $message }}</span> @enderror </div> <div class="profile-fields"> <label for="">Email</label> <input type="email" class="specific-disabled" disabled="disabled" value="{{ old('email', $user->email) }}" placeholder="Email" name="email"> </div> <div class="profile-fields"> <label for="">Phone Number</label> <input type="text" {{ $errors->any() ? '' : 'disabled' }} value="{{ old('phone', $user->phone) }}" placeholder="Phone Number" name="phone" id="phone_number"> </div> @error('phone') <span class="text-danger" id="phone-error">{{ $message }}</span> @enderror <div class="profile-fields"> <label for="{{ $user->isLanlord ? 'Mailing Address' : 'Secondary Email' }}"> {{ $user->isLanlord ? 'Mailing Address' : 'Secondary Email' }} </label> <input type="email" {{ $errors->any() ? '' : 'disabled' }} value="{{ old('mailing_address', optional($user->userInfos)->mailing_address ?? '') }}" placeholder="{{ $user->isLanlord ? 'Mailing Address' : 'Secondary Email' }}" name="mailing_address"> @error('mailing_address') <span class="text-danger" id="mailing_address-error">{{ $message }}</span> @enderror </div> @if ($user->isLanlord) <div class="profile-fields"> <label for="">Company Phone</label> <input type="text" {{ $errors->any() ? '' : 'disabled' }} value="{{ old('company_phone', optional($user->userInfos)->company_phone) }}" placeholder="Company Phone" name="company_phone"> @error('company_phone') <span class="text-danger" id="company_phone-error">{{ $message }}</span> @enderror </div> @endif <div class="profile-fields"> <label for="">Bio</label> <textarea class="custom-resizer" {{ $errors->any() ? '' : 'disabled' }} name="bio" id="" cols="30" rows="5" placeholder="Enter bio information here...">{{ old('bio', optional($user->userInfos)->bio) }}</textarea> @error('bio') <span class="text-danger" id="bio-error">{{ $message }}</span> @enderror </div> </div> <div class="col-md-12"> <div class="save-changes-button"> <button type="submit" class="save-changes-btn" disabled>Save Changes</button> </div> </div> </form> </div> </div> </div> <link href="https://cdn.jsdelivr.net/npm/sweetalert2@11.7.27/dist/sweetalert2.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.7.27/dist/sweetalert2.all.min.js"></script> <script> document.getElementById('phone_number').addEventListener('keypress', function (event) { const key = event.key; const currentInput = event.target.value; // Check if the key is a digit or the '+' sign and the length is less than 12 if ((!/^\d$/.test(key) && key !== '+') || currentInput.length >= 12) { event.preventDefault(); // Prevent the character from being input } }); document.getElementById('phone_number').addEventListener('input', function (event) { const inputValue = event.target.value; // Check if the value contains non-digit characters or exceeds 12 characters if (!/^\+?\d{0,12}$/.test(inputValue)) { // Trim the input value to a maximum of 12 characters const trimmedValue = inputValue.substring(0, 12); event.target.value = trimmedValue; } }); // document.getElementById('phone_number').addEventListener('keypress', function (event) { // const key = event.key; // // Check if the key is a digit or the '+' sign // if (!/^\d$/.test(key) && key !== '+') { // event.preventDefault(); // Prevent the character from being input // } // }); // function validateFile() { // var fileInput = document.getElementById('imageUpload'); // var fileSizeError = document.getElementById('fileSizeError'); // var maxSize = 3 * 1024 * 1024; // 3 MB in bytes // if (fileInput.files.length > 0) { // var fileSize = fileInput.files[0].size; // if (fileSize > maxSize) { // fileSizeError.textContent = 'File size exceeds the limit (3 MB).'; // fileInput.value = ''; // Clear the file input // } else { // fileSizeError.textContent = ''; // } // } // } </script> @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка