관리-도구
편집 파일: 4057520f0f442dd70b87f004654f2fd8.php
<form action="<?php echo e(route('admin.category.update')); ?>" method="POST" class="form-advance-validation form-advance-file-validation non-ajax-form-validate" enctype="multipart/form-data" novalidate="novalidate"> <?php echo csrf_field(); ?> <div class="offcanvas offcanvas-end" tabindex="-1" id="categoryEditOffcanvas-<?php echo e($category['id']); ?>" aria-labelledby="categoryEditOffcanvasLabel" style="--bs-offcanvas-width: 500px;"> <div class="offcanvas-header gap-3 justify-content-between bg-body"> <h3 class="mb-0 flex-grow-1"> <?php if($category['position'] == 1): ?> <?php echo e(translate('Edit_Sub_Category')); ?> <?php elseif($category['position'] == 2): ?> <?php echo e(translate('Edit_Sub_Sub_Category')); ?> <?php else: ?> <?php echo e(translate('Edit_Category')); ?> <?php endif; ?> </h3> <button type="button" class="btn btn-circle bg-white text-dark fs-10" style="--size: 1.5rem;" data-bs-dismiss="offcanvas" aria-label="Close"> <i class="fi fi-rr-cross"></i> </button> </div> <div class="offcanvas-body"> <div class="d-flex flex-column gap-20"> <?php if($category['position'] == 0): ?> <div class="d-flex justify-content-between align-items-center flex-wrap gap-2 p-12 p-sm-20 bg-section rounded"> <label for="" class="form-label mb-0 flex-grow-1"> <?php echo e(translate('availability')); ?> <span class="tooltip-icon" data-bs-toggle="tooltip" data-bs-placement="bottom" aria-label="<?php echo e(translate('turn_on_to_show_this_category_as_a_home_category,_or_turn_off_to_hide_it.')); ?>" data-bs-title="<?php echo e(translate('turn_on_to_show_this_category_as_a_home_category,_or_turn_off_to_hide_it.')); ?>" > <i class="fi fi-sr-info"></i> </span> </label> <label class="d-flex justify-content-between align-items-center gap-2 border rounded px-3 py-10 user-select-none flex-grow-1"> <span class="fw-medium text-dark"><?php echo e(translate('status')); ?></span> <label class="switcher"> <input type="checkbox" class="switcher_input" value="1" id="" name="home_status" <?php echo e($category['home_status'] == 1 ? 'checked' : ''); ?>> <span class="switcher_control"></span> </label> </label> </div> <?php endif; ?> <div class="p-12 p-sm-20 bg-section rounded"> <input type="hidden" name="id" value="<?php echo e($category['id']); ?>"> <input type="hidden" name="position" value="<?php echo e($category['position']); ?>"> <div class="table-responsive w-auto overflow-y-hidden mb-20"> <div class="position-relative nav--tab-wrapper"> <ul class="nav nav-pills nav--tab lang_tab" id="pills-tab" role="tablist"> <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <li class="nav-item p-0"> <a data-bs-toggle="pill" data-bs-target="#<?php echo e($lang); ?>-edit-form-<?php echo e($category['id']); ?>" role="tab" class="nav-link px-2 <?php echo e($lang == $defaultLanguage ? 'active' : ''); ?>" id="<?php echo e($lang); ?>-link"> <?php echo e(ucfirst(getLanguageName($lang)) . '(' . strtoupper($lang) . ')'); ?> </a> </li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </ul> <div class="nav--tab__prev"> <button type="button" class="btn btn-circle border-0 bg-white text-primary"> <i class="fi fi-sr-angle-left"></i> </button> </div> <div class="nav--tab__next"> <button type="button" class="btn btn-circle border-0 bg-white text-primary"> <i class="fi fi-sr-angle-right"></i> </button> </div> </div> </div> <div class="tab-content" id="pills-tabContent"> <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="tab-pane fade <?php echo e($lang == $defaultLanguage ? 'show active' : ''); ?>" id="<?php echo e($lang); ?>-edit-form-<?php echo e($category['id']); ?>" aria-labelledby="<?php echo e($lang); ?>-link" role="tabpanel"> <?php if (count($category['translations'])) { $translate = []; foreach ($category['translations'] as $t) { if ($t->locale == $lang && $t->key == 'name') { $translate[$lang]['name'] = $t->value; } } } $categoryName = ($category['position'] == 1) ? "sub_category_Name" : (($category['position'] == 2) ? "sub_sub_category_Name" : "category_Name"); $validationMessage = ($category['position'] == 1) ? "sub_category_name_is_required" : (($category['position'] == 2) ? "sub_sub_category_name_is_required" : "category_name_is_required"); ?> <div class="form-group mb-0"> <label class="form-label text-capitalize"> <?php echo e(translate($categoryName)); ?> (<?php echo e(strtoupper($lang)); ?>) <?php if($lang == $defaultLanguage): ?><span class="text-danger">*</span><?php endif; ?> </label> <input type="text" name="name[]" value="<?php echo e($lang == $defaultLanguage ? $category['name'] : $translate[$lang]['name'] ?? ''); ?>" data-required-msg="<?php echo e(translate($validationMessage)); ?>" class="form-control" <?php if($category['position'] == 1): ?> placeholder="<?php echo e(translate('type_sub_category_name')); ?>" <?php elseif($category['position'] == 2): ?> placeholder="<?php echo e(translate('type_sub_sub_category_name')); ?>" <?php else: ?> placeholder="<?php echo e(translate('type_category_name')); ?>" <?php endif; ?> <?php echo e($lang == $defaultLanguage ? 'required' : ''); ?>> </div> <input type="hidden" name="lang[]" value="<?php echo e($lang); ?>"> <input type="hidden" name="id" value="<?php echo e($category['id']); ?>"> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <?php if($category['position'] == 1 && isset($parentCategories)): ?> <div class="form-group mb-20 mt-20"> <label class="form-label" for="exampleFormControlSelect1"><?php echo e(translate('main_Category')); ?> <span class="text-danger">*</span> <span class="tooltip-icon" data-bs-toggle="tooltip" data-bs-placement="top" aria-label="<?php echo e(translate('select_the_main_category_under_which_this_item_will_be_listed.')); ?>" data-bs-title="<?php echo e(translate('select_the_main_category_under_which_this_item_will_be_listed.')); ?>"> <i class="fi fi-sr-info"></i> </span> </label> <select class="custom-select form-control" name="parent_id" data-placeholder="<?php echo e(translate('Select')); ?>" data-required-msg="<?php echo e(translate('main_category_is_required')); ?>" required> <option value=""></option> <?php $__currentLoopData = $parentCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $parentCategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($parentCategory['id']); ?>" <?php echo e($parentCategory['id'] == $category['parent_id'] ? 'selected' : ''); ?>> <?php echo e($parentCategory['defaultname']); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <?php endif; ?> <?php if($category['position'] == 2): ?> <input type="hidden" name="parent_id" value="<?php echo e($category['parent_id']); ?>"> <?php endif; ?> <div class="form-group mb-20 mt-20"> <label class="form-label text-capitalize" for="priority"> <?php echo e(translate('priority')); ?><span class="text-danger">*</span> <span class="tooltip-icon" data-bs-toggle="tooltip" data-bs-placement="top" aria-label="<?php echo e(translate('the_lowest_number_will_get_the_highest_priority')); ?>" data-bs-title="<?php echo e(translate('the_lowest_number_will_get_the_highest_priority')); ?>"> <i class="fi fi-sr-info"></i> </span> </label> <div> <select class="custom-select" name="priority" id="" data-placeholder="<?php echo e(translate('set_Priority')); ?>" data-required-msg="<?php echo e(translate('Priority_is_required')); ?>" required> <option></option> <?php for($index = 0; $index <= 10; $index++): ?> <option value="<?php echo e($index); ?>" <?php echo e($category['priority'] == $index ? 'selected' : ''); ?>> <?php echo e($index); ?></option> <?php endfor; ?> </select> </div> </div> </div> <?php if($category->position == 0): ?> <?php if($categoryWiseTax): ?> <div class="form-group mb-20 mt-20"> <label class="form-label" for="tax-ids-update-<?php echo e($category['id']); ?>"> <?php echo e(translate('Select_Vat/Tax_Rate')); ?> <span class="input-required-icon">*</span> </label> <select class="custom-select multiple-select2" id="tax-ids-update-<?php echo e($category['id']); ?>" name="tax_ids[]" multiple="multiple" data-placeholder="<?php echo e(translate('type_&_Select_Vat/Tax_Rate')); ?>"> <?php $__currentLoopData = $taxVats; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $taxVat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option <?php echo e(in_array($taxVat->id, $category?->taxVats->pluck('tax_id')->toArray()) ? 'selected' : ''); ?> value="<?php echo e($taxVat->id); ?>"> <?php echo e($taxVat->name); ?> (<?php echo e($taxVat->tax_rate); ?>%) </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <?php endif; ?> <?php endif; ?> <?php if($category->position == 0 || ($category->position == 1 && theme_root_path() == 'theme_aster')): ?> <div class="p-12 p-sm-20 bg-section rounded"> <div class="d-flex flex-column gap-30"> <div class="text-center"> <label for="" class="form-label fw-semibold mb-1"> <?php echo e(translate('category_Logo')); ?> <span class="text-danger">*</span> </label> <p class="fs-12 mb-0"> <?php echo e(translate('Upload_image')); ?></p> </div> <div class="upload-file"> <input type="file" name="image" id="category-image" class="upload-file__input single_file_input" data-max-size="<?php echo e(getFileUploadMaxSize()); ?>" data-required-msg="<?php echo e(translate('category_Logo_is_required')); ?>" accept="<?php echo e(getFileUploadFormats(skip: '.svg,.gif')); ?>"> <label class="upload-file__wrapper"> <div class="upload-file-textbox text-center"> <img width="34" height="34" class="svg" src="<?php echo e(dynamicAsset(path: 'public/assets/new/back-end/img/svg/image-upload.svg')); ?>" alt="image upload"> <h6 class="mt-1 fw-medium lh-base text-center"> <span class="text-info"> <?php echo e(translate('Click_to_upload')); ?> </span><br> <?php echo e(translate('or_drag_and_drop')); ?> </h6> </div> <img class="upload-file-img" loading="lazy" src="<?php echo e(getStorageImages(path: $category->icon_full_url, type: 'backend-basic') ?? ''); ?>" data-default-src="<?php echo e(getStorageImages(path: $category->icon_full_url, type: 'backend-basic') ?? ''); ?>" alt=""> </label> <div class="overlay"> <div class="d-flex gap-10 justify-content-center align-items-center h-100"> <button type="button" class="btn btn-outline-info icon-btn view_btn"> <i class="fi fi-sr-eye"></i> </button> <button type="button" class="btn btn-outline-info icon-btn edit_btn"> <i class="fi fi-rr-camera"></i> </button> </div> </div> </div> <p class="fs-10 mb-0 text-center"> <?php echo e(getFileUploadFormats(skip: '.svg, .gif', asBladeMessage: true).' '. translate('Image_size'). ' : '. translate('Max').' '. getFileUploadMaxSize() . 'MB'); ?> <span class="text-dark fw-medium"> <?php echo e(THEME_RATIO[theme_root_path()]['Category Image']); ?> </span> </p> </div> </div> <?php endif; ?> <div class="p-12 p-sm-20 bg-section rounded"> <h3 class="border-bottom pb-2 mb-3"><?php echo e(translate('Meta Data Setup')); ?></h3> <div class="form-group mb-20"> <label class="form-label"> <?php echo e(translate('meta_Title')); ?> <span class="tooltip-icon cursor-pointer" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(translate('add_the_category_name_taglines_etc_here.').' '.translate('this_meta_title_will_be_seen_on_search_engine_results_pages_and_while_sharing_the_category_link_on_social_platforms') .' [ '. translate('character_Limit')); ?> : 50 ]"> <i class="fi fi-sr-info"></i> </span> </label> <input type="text" name="meta_title" placeholder="<?php echo e(translate('meta_Title')); ?>" data-maxlength="50" class="form-control" id="meta_title" value="<?php echo e($category?->seo?->title ?? ''); ?>"> <div class="d-flex justify-content-end"> <span class="text-body-light">0/50</span> </div> </div> <div class="form-group mb-20"> <label class="form-label"> <?php echo e(translate('meta_Description')); ?> <span class="tooltip-icon cursor-pointer" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(translate('write_a_short_description_of_the_category.').' '.translate('this_description_will_be_seen_on_search_engine_results_pages_and_while_sharing_the_category_link_on_social_platforms') .' [ '. translate('character_Limit')); ?> : 160 ]"> <i class="fi fi-sr-info"></i> </span> </label> <textarea rows="4" type="text" name="meta_description" id="meta_description" data-maxlength="160" class="form-control" placeholder="<?php echo e(translate('write_a_short_description_of_the_category')); ?>"><?php echo e($category?->seo?->description); ?></textarea> <div class="d-flex justify-content-end"> <span class="text-body-light">0/160</span> </div> </div> <div class="form-group"> <div class="d-flex justify-content-center"> <label for="meta_Image" class="form-label fw-semibold mb-0"> <?php echo e(translate('meta_Image')); ?> <span class="badge badge-info text-bg-info"><?php echo e(THEME_RATIO[theme_root_path()]['Meta Thumbnail']); ?></span> <span class="tooltip-icon cursor-pointer" data-bs-toggle="tooltip" aria-label="<?php echo e(translate('add_Meta_Image_in')); ?> JPG, PNG or JPEG <?php echo e(translate('format_within')); ?> 2MB, <?php echo e(translate('which_will_be_shown_in_search_engine_results')); ?>." data-bs-title="<?php echo e(translate('add_Meta_Image_in')); ?> JPG, PNG or JPEG <?php echo e(translate('format_within')); ?> 2MB, <?php echo e(translate('which_will_be_shown_in_search_engine_results')); ?>." > <i class="fi fi-sr-info"></i> </span> </label> </div> <div class="d-flex justify-content-center pt-4"> <div class="upload-file"> <input type="file" name="meta_image" class="upload-file__input single_file_input" data-max-size="<?php echo e(getFileUploadMaxSize()); ?>" id="meta_image_input" accept="<?php echo e(getFileUploadFormats(skip:'.svg,.gif')); ?>" value="" > <label class="upload-file__wrapper ratio-2-1"> <div class="upload-file-textbox text-center"> <img width="34" height="34" src="<?php echo e(dynamicAsset(path: 'public/assets/new/back-end/img/svg/image-upload.svg')); ?>" alt="image upload"> <h6 class="mt-1 fw-medium lh-base text-center"> <span class="text-info"><?php echo e(translate('Click_to_upload')); ?></span> <br> <?php echo e(translate('or_drag_and_drop')); ?> </h6> </div> <img class="upload-file-img pre-meta-image-viewer" loading="lazy" src="<?php echo e($category?->seo?->image_full_url['path'] ? getStorageImages(path: $category?->seo?->image_full_url['path'] ? $category?->seo?->image_full_url : '', type: 'backend-banner') : ''); ?>" data-default-src="<?php echo e($category?->seo?->image_full_url['path'] ? getStorageImages(path: $category?->seo?->image_full_url['path'] ? $category?->seo?->image_full_url : '', type: 'backend-banner') : ''); ?>" alt=""> </label> <div class="overlay"> <div class="d-flex gap-10 justify-content-center align-items-center h-100"> <button type="button" class="btn btn-outline-info icon-btn view_btn"> <i class="fi fi-sr-eye"></i> </button> <button type="button" class="btn btn-outline-info icon-btn edit_btn"> <i class="fi fi-rr-camera"></i> </button> </div> </div> </div> </div> </div> </div> </div> </div> <div class="offcanvas-footer shadow-popup"> <div class="d-flex justify-content-center flex-wrap gap-3 bg-white px-3 py-2"> <button type="reset" id="reset" class="btn btn-secondary flex-grow-1"> <?php echo e(translate('reset')); ?> </button> <button type="submit" class="btn btn-primary flex-grow-1"> <?php echo e(translate('update')); ?> </button> </div> </div> </div> </form> <?php /**PATH /home2/slnssare/public_html/resources/views/admin-views/category/offcanvas/_category-edit.blade.php ENDPATH**/ ?>