![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-backend/view/adminhtml/web/js/ |
/** * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ define([ 'jquery', 'Magento_Backend/js/validate-store' ], function ($, validateStore) { 'use strict'; $.widget('mage.saveWithConfirm', validateStore, { /** * Check is it need to show confirmation popup * * @returns {Boolean} */ _needConfirm: function () { var storeData = this.settings.storeData, /* edit store view*/ storeViewEdit = $('[name="store[store_id]"]').length, groupId = $('[name="store[group_id]"]').val(), isNewStoreView = !$('[name="store[store_id]"]').val(), /* edit store */ storeEdit = $('[name="group[group_id]"]').length, storeId = $('[name="group[group_id]"]').val(), rootCategoryId = $('[name="group[root_category_id]"]').val(), defaultStoreView = $('[name="group[default_store_id]"]').val(), /* edit website */ websiteEdit = $('[name="website[website_id]"]').length, defaultStore = $('[name="website[default_group_id]"]').val(), /* conditions */ storeViewUpdated = storeViewEdit && (isNewStoreView || storeData['group_id'] !== groupId), storeUpdated = storeEdit && storeId && (rootCategoryId !== null && storeData['root_category_id'] !== rootCategoryId || defaultStoreView !== null && storeData['default_store_id'] !== defaultStoreView), websiteUpdated = websiteEdit && defaultStore !== null && storeData['default_group_id'] !== defaultStore; return storeViewUpdated || storeUpdated || websiteUpdated; } }); return $.mage.saveWithConfirm; });