Файловый менеджер - Редактировать - /home/clickysoft/public_html/travel-guru.clickysoft.net/storage/framework/views/e11362e87986323a4ae417a62a6061fd.php
Назад
<?php $__env->startSection('title', 'Profile Settings'); ?> <?php $__env->startSection('content'); ?> <!-- Profile EDIT SECTION BEGIN --> <section class="portfolio-edit-sec"> <div class="container-fluid"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 col-12"> <div class="portfolio-edit-flex"> <?php echo $__env->make('front.travelAgent.setting-sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <div class="scrollbar2" id="style-3"> <div class="force-overflow"> <div class="right-setting-cont"> <h5>My Profile</h5> <?php if(session('success')): ?> <div class="alert alert-success"> <?php echo e(session('success')); ?> </div> <?php endif; ?> <form id="profile-form" action="<?php echo e(route('agent.profile.setting.update')); ?>" method="POST"> <?php echo csrf_field(); ?> <div class="form-label-xont"> <label>Full Name <a href="javascript:void(0)" id="edit-input">Edit</a></label> <input type="text" class="form-control <?php $__errorArgs = ['full_name']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?>" name="full_name" value="<?php echo e(old('full_name', auth()->user()->full_name)); ?>" readonly> <?php $__errorArgs = ['full_name']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <div class="invalid-feedback"> <?php echo e($message); ?> </div> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <div class="form-label-xont"> <label>Specialist</label> <textarea name="specialist" id="specialist" class="form-control <?php $__errorArgs = ['specialist']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?>" maxlength="30" readonly><?php echo e(old('specialist', auth()->user()->specialist ?? 'N/A')); ?></textarea> <div id="specialist-counter" class="d-none">30 characters remaining</div> <?php $__errorArgs = ['specialist']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <div class="invalid-feedback"> <?php echo e($message); ?> </div> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <div class="form-label-xont"> <label>Summary</label> <textarea name="summary" id="summary" cols="4" rows="4" readonly class="form-control <?php $__errorArgs = ['summary']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?>"><?php echo e(old('summary', auth()->user()->summary)); ?></textarea> <div id="summary-counter" class="d-none">700 characters remaining</div> <?php $__errorArgs = ['summary']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <div class="invalid-feedback"> <?php echo e($message); ?> </div> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <div class="form-label-xont"> <label>Languages</label> <input name="languages" type="text" class="form-control tagify <?php $__errorArgs = ['languages']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?>" id="languages" value="<?php echo e(old('languages', auth()->user()->languages)); ?>" readonly> <?php $__errorArgs = ['languages']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <div class="invalid-feedback"> <?php echo e($message); ?> </div> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <div class="form-label-xont"> <label for="yearsExperience">Years of experience</label> <select id="yearsExperience" class="form-control" name="years_of_experience" disabled> <option value="" disabled <?php echo e(is_null(auth()->user()->years_of_experience) ? 'selected' : ''); ?>>Select Years</option> <?php for($i = 1; $i <= 30; $i++): ?> <option value="<?php echo e($i); ?>" <?php echo e(auth()->user()->years_of_experience == $i ? 'selected' : ''); ?>> <?php echo e($i); ?> Year<?php echo e($i > 1 ? 's' : ''); ?> </option> <?php endfor; ?> </select> </div> <div class="form-label-xont"> <label>Destination you serve</label> <input name="destinationsTagify" id="destinationSelect" class="form-control tagify <?php $__errorArgs = ['destinations']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?>" placeholder="Select Destinations You Serve" value="<?php echo e(old('destinationsTagify')); ?>" readonly /> <input type="hidden" name="destinations" id="destinations" value="<?php echo e(old('destinations')); ?>"> <?php $__errorArgs = ['destinations']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <div class="invalid-feedback"> <?php echo e($message); ?> </div> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <div class="form-label-xont"> <label>Categories you serve</label> <input name="categoriesTagify" id="categoriesSelect" class="form-control tagify <?php $__errorArgs = ['categories']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?>" placeholder="Select Categories You Serve:" value="<?php echo e(old('categoriesTagify')); ?>" readonly /> <input type="hidden" name="categories" id="categories" value="<?php echo e(old('categories')); ?>"> <?php $__errorArgs = ['categories']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <div class="invalid-feedback" style="display: block"> <?php echo e($message); ?> </div> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <div class="save-changes-setting"> <button type="submit" class="btn btn-primary" id="save-btn" style="display: none;">Save changes</button> </div> </form> </div> </div> </div> </div> </div> </div> </section> <!-- Profile EDIT SECTION END --> <?php $__env->stopSection(); ?> <?php $__env->startPush('front-scripts'); ?> <script src="<?php echo e(asset('assets/admin/vendor/libs/tagify/tagify.js')); ?>"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> </script> <script> var hasValidationErrors = <?php echo e($errors->any() ? 'true' : 'false'); ?>; </script> <script> // TOGGLE FIELDS HIDE & SHOW SCRIPT BEGIN $(".pass-shw").click(function() { $(".fields-hide-show").toggle(); }); // TOGGLE FIELDS HIDE & SHOW SCRIPT END // EYE ICON HIDE & SHOW PASSSWORD SCRIPT BEGIN function togglePassword(eyeIcon) { const passwordField = eyeIcon .closest(".pass-grd-field") .querySelector(".password-field"); if (passwordField.type === "password") { passwordField.type = "text"; eyeIcon.classList.remove("fa-eye"); eyeIcon.classList.add("fa-eye-slash"); } else { passwordField.type = "password"; eyeIcon.classList.remove("fa-eye-slash"); eyeIcon.classList.add("fa-eye"); } } // EYE ICON HIDE & SHOW PASSSWORD SCRIPT END </script> <script> document.addEventListener('DOMContentLoaded', function() { const languageInput = document.getElementById('languages'); const languageTagify = new Tagify(languageInput, { whitelist: <?php echo json_encode(explode(',', auth()->user()->languages)); ?>, maxTags: 10, enforceWhitelist: false, dropdown: { maxItems: 50, classname: "tags-look", enabled: 0, closeOnSelect: false } }); //Destination var $destinationSelect = $('#destinationSelect'); var destinationInput = document.querySelector('input[name="destinationsTagify"]'); var hiddenDestinationInput = document.querySelector('input[name="destinations"]'); var selectedDestinations = <?php echo json_encode($selectedDestinations); ?>; // $('#destinationSelect').on('change', function() { // var selectedDestinations = $(this).val(); // Get selected destinations // fetchCountriesByDestinations( // selectedDestinations); // Call the function with selected destinations // }); var oldDestinations = "<?php echo e(old('destinations')); ?>".split(',').filter(function(item) { return item.trim().length > 0; }); // Initialize Tagify var destinationTagify = new Tagify(destinationInput, { enforceWhitelist: true, whitelist: <?php echo json_encode($destinationsData); ?>, dropdown: { maxItems: 200, enabled: 0, closeOnSelect: false } }); if (oldDestinations.length > 0) { hiddenDestinationInput.value = oldDestinations.join(','); } else { // Use selectedDestinations if no old values are present destinationTagify.addTags(selectedDestinations); hiddenDestinationInput.value = selectedDestinations.map(tag => tag.name).join(','); } destinationTagify.on('change', function() { var selectedDestinationIds = destinationTagify.value.map(tag => tag.name); hiddenDestinationInput.value = selectedDestinationIds.join(','); // Clear hidden input if no destinations are selected if (selectedDestinationIds.length === 0) { hiddenDestinationInput.value = ''; } }); // function fetchCountriesByDestinations(selectedDestinations) { // $.ajax({ // url: '<?php echo e(route('get.countries.by.destination')); ?>', // type: 'GET', // data: { // destination_ids: selectedDestinations // Adjusted payload // }, // success: function(countries) { // var currentTags = countryTagify.value.map(tag => tag.value); // countryTagify.settings.whitelist = countries.map(country => ({ // value: country.value, // name: country.name // })); // var newTags = currentTags.filter(tagValue => // countryTagify.settings.whitelist.some(country => country.value === // tagValue) // ); // countryTagify.removeAllTags(); // countryTagify.addTags(newTags); // $countryField.show(); // } // }); // } <?php $__errorArgs = ['destinations']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> // Clear the Tagify input if there's an error and old value is empty destinationTagify.removeAllTags(); hiddenDestinationInput.value = ''; <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> // TODO: json encode add curlybraces and !! // var countries = json_encode($selectedCountries) ; // var selectedCountries = json_encode($selectedCountries); // var $countryField = $('#countrySelect').closest('.form-label-xont'); // var countryInput = document.querySelector('input[name="countriesTagify"]'); // var hiddenCountryInput = document.querySelector('input[name="countries"]'); // var countryTagify = new Tagify(countryInput, { // enforceWhitelist: true, // whitelist: countries, // dropdown: { // maxItems: 200, // enabled: 0, // closeOnSelect: false // } // }); // var oldCountries = "<?php echo e(old('countries')); ?>".split(',').filter(function(item) { // return item.trim().length > 0; // }); // if (oldCountries.length > 0) { // countryTagify.addTags(oldCountries); // hiddenCountryInput.value = oldCountries.join(','); // } else { // countryTagify.addTags(selectedCountries); // hiddenCountryInput.value = selectedCountries.map(tag => tag.name).join(','); // } // countryTagify.on('change', function() { // var selectedCountryIds = countryTagify.value.map(tag => tag.name); // hiddenCountryInput.value = selectedCountryIds.join(','); // if (selectedCountryIds.length === 0) { // hiddenCountryInput.value = ''; // } // }); // <?php $__errorArgs = ['countries']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> // countryTagify.removeAllTags(); // hiddenCountryInput.value = ''; // var selectedDestinations = $('#destinationSelect').val(); // fetchCountriesByDestinations( // selectedDestinations); // Call the function with selected destinations // <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> // $destinationSelect.on('change', function() { // var selectedDestinations = $(this).val(); // if (selectedDestinations && selectedDestinations.length > 0) { // $.ajax({ // url: '<?php echo e(route('get.countries.by.destination')); ?>', // type: 'GET', // data: { // destination_ids: selectedDestinations // }, // success: function(countries) { // var currentTags = countryTagify.value.map(tag => tag.value); // countryTagify.settings.whitelist = countries.map(country => ({ // value: country.value, // name: country.name // })); // var newTags = currentTags.filter(tagValue => // countryTagify.settings.whitelist.some(country => country // .value === tagValue) // ); // countryTagify.removeAllTags(); // countryTagify.addTags(newTags); // $countryField.show(); // } // }); // } else { // // If no destinations are selected, clear and hide the country field // $countryField.hide(); // countryTagify.removeAllTags(); // hiddenCountryInput.value = ''; // } // }); var selectedCategories = <?php echo json_encode($selectedCategories); ?>; var categoriesInput = document.querySelector('input[name="categoriesTagify"]'); var hiddenCategoriesInput = document.querySelector('input[name="categories"]'); var categoriesTagify = new Tagify(categoriesInput, { enforceWhitelist: true, whitelist: <?php echo json_encode($categoriesData); ?>, dropdown: { maxItems: 200, enabled: 0, closeOnSelect: false } }); var oldCategories = "<?php echo e(old('categories')); ?>".split(',').filter(function(item) { return item.trim().length > 0; }); if (oldCategories.length > 0) { categoriesTagify.addTags(oldCategories); hiddenCategoriesInput.value = oldCategories.join(','); } else { categoriesTagify.addTags(selectedCategories); hiddenCategoriesInput.value = selectedCategories.map(tag => tag.name).join(','); } categoriesTagify.on('change', function() { var selectedCategoryIds = categoriesTagify.value.map(tag => tag.name); hiddenCategoriesInput.value = selectedCategoryIds.join(','); if (selectedCategoryIds.length === 0) { hiddenCategoriesInput.value = ''; } }); <?php $__errorArgs = ['categories']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> categoriesTagify.removeAllTags(); hiddenCategoriesInput.value = ''; <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> var isEditing = hasValidationErrors; $('input, textarea').prop('readonly', !hasValidationErrors); $('#save-btn').hide(); destinationTagify.setReadonly(!hasValidationErrors); categoriesTagify.setReadonly(!hasValidationErrors); // countryTagify.setReadonly(!hasValidationErrors); languageTagify.setReadonly(!hasValidationErrors); $('#yearsExperience').prop('disabled', !hasValidationErrors); $('#edit-input').data('editing', hasValidationErrors).text(hasValidationErrors ? 'Cancel' : 'Edit'); $('#specialist-counter, #summary-counter').toggleClass('d-none', !hasValidationErrors); $('#edit-input').click(function() { isEditing = !isEditing; $('input, textarea').prop('readonly', !isEditing); if (isEditing) { $('#save-btn').show(); } else { $('#save-btn').hide(); } destinationTagify.setReadonly(!isEditing); categoriesTagify.setReadonly(!isEditing); // countryTagify.setReadonly(!isEditing); languageTagify.setReadonly(!isEditing); $('#yearsExperience').prop('disabled', !isEditing); $('#specialist-counter, #summary-counter').toggleClass('d-none', !isEditing); $(this).data('editing', isEditing).text(isEditing ? 'Cancel' : 'Edit'); }); }); document.addEventListener('DOMContentLoaded', function() { const textareas = [{ element: document.getElementById('specialist'), counter: document.getElementById('specialist-counter'), max: 30 }, { element: document.getElementById('summary'), counter: document.getElementById('summary-counter'), max: 700 } ]; function updateCounter(textarea) { const remaining = textarea.max - textarea.element.value.length; textarea.counter.textContent = `${Math.max(remaining, 0)} /${textarea.max}`; if (remaining < 0) textarea.element.value = textarea.element.value.substring(0, textarea.max); } textareas.forEach(textarea => { updateCounter(textarea); textarea.element.addEventListener('input', () => updateCounter(textarea)); }); }); // PROFILE PAGE HEIGHT SETTING SCRIPT BEGIN const container = document.querySelector(".scrollbar2"); function checkHeight() { if (container.scrollHeight > 710) { container.classList.add("exceed"); } else { container.classList.remove("exceed"); } } checkHeight(); window.addEventListener("resize", checkHeight); // PROFILE PAGE HEIGHT SETTING SCRIPT END </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('front.layouts.travel-agent-master', ['is_travel_agent' => true], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/clickysoft/public_html/travel-guru.clickysoft.net/resources/views/front/travelAgent/profile.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка