ltsecurityinc安防产品在线商城代码
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
<!--@subject Get a Quote Answer from {{var store_name}} @-->
|
||||
<!--@vars {
|
||||
"var customer_name":"Sender Name",
|
||||
"var store.frontend_name":"Store Name",
|
||||
"var message":"Message from Admin",
|
||||
"var request":"Request Model"
|
||||
} @-->
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<table>
|
||||
<tr class="email-intro">
|
||||
<td valign="top">
|
||||
<p><strong>{{trans "Hello %name," name=$request.name}}</strong></p>
|
||||
|
||||
<p>{{var message}}</p>
|
||||
|
||||
<p>{{trans "Sincerely, %store Team." store=$store.frontend_name}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<!--@subject Get a Quote Notification from {{var customer_name}} @-->
|
||||
<!--@vars {
|
||||
"var customer_name":"Sender Name",
|
||||
"var request.comment":"Comment",
|
||||
"var request.email":"Sender Email",
|
||||
"var request.name":"Sender Name",
|
||||
"var request.phone":"Sender Telephone",
|
||||
"var request.product_name":"Product",
|
||||
"var request.comment":"Comment"
|
||||
} @-->
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<table>
|
||||
<tr class="email-intro">
|
||||
<td valign="top">
|
||||
|
||||
<p><strong>{{trans "You have a new quote request placed by"}} {{var customer_name}},</strong></p>
|
||||
|
||||
<p>{{trans "Request details:"}}</p>
|
||||
|
||||
<p>{{trans "Name: %name" name=$request.name}}</p>
|
||||
<p>{{trans "Email: %email" email=$request.email}}</p>
|
||||
<p>{{trans "Phone Number: %phone" phone=$request.phone}}</p>
|
||||
<p>{{trans "Product: %product" product=$request.product_name}}</p>
|
||||
<p>{{trans "Comment: %comment" comment=$request.comment}}</p>
|
||||
|
||||
<p>{{trans "Best Regards, %store Team." store=$store.frontend_name}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<!--@subject Get a Quote from {{var store_name}} @-->
|
||||
<!--@vars {
|
||||
"var website_name":"Website Name",
|
||||
"var store.frontend_name":"Store Name",
|
||||
"var customer_name":"Customer Name",
|
||||
"var request":"Request Model"
|
||||
} @-->
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<table>
|
||||
<tr class="email-intro">
|
||||
<td valign="top">
|
||||
<p><strong>{{trans "Hello %name," name=$request.name}}</strong></p>
|
||||
|
||||
<p>{{trans "Thank you for contacting us!"}}</p>
|
||||
|
||||
<p>{{trans "Your quote request is being processed at the moment."}}</p>
|
||||
|
||||
<p>{{trans "We’ll get back to you as soon as possible"}}</p>
|
||||
|
||||
<p>{{trans "Best Regards, %store Team." store=$store.frontend_name}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Hide Price (Call for Price) for Magento 2
|
||||
*/-->
|
||||
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<head>
|
||||
<css src="Amasty_HidePrice::css/amhideprice-styles.css"/>
|
||||
</head>
|
||||
</page>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Hide Price (Call for Price) for Magento 2
|
||||
*/-->
|
||||
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<head>
|
||||
<css src="Amasty_HidePrice::js/fancyambox/jquery.fancyambox.min.css"/>
|
||||
<css src="Amasty_HidePrice::css/amhideprice.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<referenceContainer name="content">
|
||||
<block after="-" name="Amasty_HidePrice_Form" class="Amasty\HidePrice\Block\Form"/>
|
||||
</referenceContainer>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,20 @@
|
||||
var config = {
|
||||
map: {
|
||||
'*': {
|
||||
'amasty-fancyambox' : 'Amasty_HidePrice/js/fancyambox/jquery.fancyambox.min'
|
||||
}
|
||||
},
|
||||
config: {
|
||||
mixins: {
|
||||
'mage/validation': {
|
||||
'Amasty_HidePrice/js/validation-mixin': true
|
||||
},
|
||||
'Magento_Swatches/js/swatch-renderer': {
|
||||
'Amasty_HidePrice/js/swatch-renderer-mixin': true
|
||||
},
|
||||
'Amasty_Conf/js/swatch-renderer': {
|
||||
'Amasty_HidePrice/js/swatch-renderer-mixin': true
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Hide Price (Call for Price) for Magento 2
|
||||
*/ /** @var \Amasty\HidePrice\Block\Form $block */ ?>
|
||||
<form class="amhideprice-form" id="amhideprice-form" method="post" style="display: none;" data-nofocus="true">
|
||||
<span class="amhideprice-close" data-amhide-js="close-popup"></span>
|
||||
<input name="form_key" type="hidden" value="<?php echo $block->escapeHtml($block->getFormKey()) ?>" />
|
||||
<input name="product_id" type="hidden" value="" />
|
||||
<fieldset class="fieldset">
|
||||
<legend class="legend amhideprice-form-ledend">
|
||||
<span><?= __('Get a Quote for') ?></span>
|
||||
<span style="font-weight: bolder;" class="product-name"></span>
|
||||
</legend>
|
||||
<br>
|
||||
<div class="field required">
|
||||
<label for="amhideprice-name" class="label">
|
||||
<span><?= __('Customer Name') ?></span>
|
||||
</label>
|
||||
|
||||
<div class="control">
|
||||
<input type="text" name="name" class="input-text"
|
||||
id="amhideprice-name" data-validate="{required:true}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field required">
|
||||
<label for="amhideprice-email" class="label">
|
||||
<span><?= __('Customer Email') ?></span>
|
||||
</label>
|
||||
|
||||
<div class="control">
|
||||
<input type="email"
|
||||
name="email"
|
||||
id="amhideprice-email"
|
||||
autocomplete="email"
|
||||
value="" class="input-text"
|
||||
data-validate="{required:true, 'validate-email':true}"
|
||||
aria-required="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field required">
|
||||
<label for="amhideprice-phone" class="label">
|
||||
<span><?= __('Phone Number') ?></span>
|
||||
</label>
|
||||
|
||||
<div class="control">
|
||||
<input type="text" name="phone" class="input-text "
|
||||
id="amhideprice-phone" data-validate="{required:true}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="amhideprice-comment" class="label">
|
||||
<span><?= __('Comment') ?></span>
|
||||
</label>
|
||||
|
||||
<div class="control">
|
||||
<textarea title="<?= __('Comment') ?>"
|
||||
name="comment" class="input-text"
|
||||
id="amhideprice-comment"
|
||||
data-validate="{'validate-no-html-tags':true}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($block->isGDPREnabled()) : ?>
|
||||
<div class="field required">
|
||||
<label class="label" for="amhideprice-gdpr">
|
||||
<input type="checkbox"
|
||||
name="gdpr"
|
||||
id="amhideprice-gdpr"
|
||||
title="<?= __('GDPR'); ?>"
|
||||
data-validate="{required:true}"
|
||||
value="1">
|
||||
<?= $block->getGDPRText(); ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary">
|
||||
<button type="submit" class="action submit primary"
|
||||
title="<?= __('Submit') ?>">
|
||||
<span><?= __('Submit') ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,3 @@
|
||||
.amasty-hide-price-button {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
@media all and (min-width: 768px), print {
|
||||
.amhideprice-form {
|
||||
max-width: 700px;
|
||||
width: 40%;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 767px), print {
|
||||
.amhideprice-form {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
.amhideprice-form {
|
||||
position: relative;
|
||||
padding: 30px;
|
||||
vertical-align: middle;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
div.message.am-hide-message {
|
||||
display: inline-block;
|
||||
padding: 13px 70px;
|
||||
}
|
||||
|
||||
.fancyambox-stage .amhideprice-form .legend span {
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
|
||||
.amhideprice-close {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgMWwxMSAxMW0wLTExTDEgMTIiIHN0cm9rZT0iI0IyQjJCMiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==) no-repeat center;
|
||||
background-size: contain;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.amhideprice-close:hover {
|
||||
background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMyIgaGVpZ2h0PSIxMyIgZmlsbD0ibm9uZSI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjxnIGNsYXNzPSJjdXJyZW50TGF5ZXIiPjxwYXRoIGQ9Ik0xIDFsMTEgMTFtMC0xMUwxIDEyIiBzdHJva2U9IiMxZGExZjIiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGNsYXNzPSJzZWxlY3RlZCIvPjwvZz48L3N2Zz4=) no-repeat center;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
a.amasty-hide-price-container {
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
define([
|
||||
'jquery',
|
||||
'Magento_Ui/js/modal/modal'
|
||||
], function ($) {
|
||||
$.widget('mage.amhideprice', {
|
||||
options: {},
|
||||
_create: function () {
|
||||
if (this.element) {
|
||||
var parent = this.element.parents(this.options['parent']).first();
|
||||
if (!parent) {
|
||||
return;
|
||||
}
|
||||
|
||||
var button = parent.find(this.options['button']),
|
||||
addButton = parent.find('.actions-primary form button');
|
||||
if (button && button[0]
|
||||
&& (this.options['hide_addtocart'] === '1' || this.options['hide_addtocart'] === '2')
|
||||
) {
|
||||
button[0].outerHTML = this.options['html'];
|
||||
eval($('<div>').html(this.options['html']).find('script').html());
|
||||
}
|
||||
|
||||
if (addButton.length > 0 && this.options['hide_addtocart'] === '1') {
|
||||
addButton.remove();
|
||||
}
|
||||
|
||||
if (this.options['hide_addtocart'] === '1') {
|
||||
$('[data-role="all-tocart"]').remove();
|
||||
}
|
||||
|
||||
if (this.options['hide_compare'] === '1') {
|
||||
parent.find('a.tocompare').remove();
|
||||
}
|
||||
|
||||
if (this.options['hide_wishlist'] === '1') {
|
||||
parent.find('a.towishlist').remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return $.mage.amhideprice;
|
||||
});
|
||||
@@ -0,0 +1,187 @@
|
||||
define([
|
||||
'jquery',
|
||||
'uiClass',
|
||||
'amasty-fancyambox'
|
||||
], function ($, Class, fancyambox) {
|
||||
var amHidePriceForm = Class.extend({
|
||||
products: {},
|
||||
customer: null,
|
||||
selectors: {
|
||||
amHidePricePopup: '[data-amhide="AmastyHidePricePopup"][data-product-id="%s"]:not(.observed)',
|
||||
onClickPopup: 'observed',
|
||||
amHideClosePopup: '[data-amhide-js="close-popup"]',
|
||||
formClass: '.amform-form.amhideprice-form',
|
||||
formId: '#amhideprice-form',
|
||||
fancyBoxContainer: '.fancyambox-container .amhideprice-form',
|
||||
hideProductIdName: '[name="hide_product_id"]',
|
||||
hideProductId: 'hide_product_id',
|
||||
productName: '.product-name',
|
||||
productIdAttr: 'data-product-id',
|
||||
successMessage: 'success am-hide-message',
|
||||
errorMessage: 'error am-hide-message',
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
},
|
||||
|
||||
addProduct: function (product) {
|
||||
this.products[product['id']] = product['name'];
|
||||
this.customer = product['customer'];
|
||||
this.url = product['url'];
|
||||
this._createButtonObserver(product['id']);
|
||||
},
|
||||
|
||||
_createButtonObserver: function (id) {
|
||||
var self = this,
|
||||
popupSelector = self._getPopupSelectorById(id);
|
||||
|
||||
$(popupSelector).click(function (e) {
|
||||
e.stopPropagation();
|
||||
self._showPopup(this);
|
||||
}).addClass(
|
||||
self.selectors.onClickPopup
|
||||
);
|
||||
|
||||
$(document).on('click', self.selectors.amHideClosePopup, function () {
|
||||
$.fancyambox.close();
|
||||
});
|
||||
},
|
||||
|
||||
_getPopupSelectorById: function (id) {
|
||||
return this.selectors.amHidePricePopup.replace(/%s/, id);
|
||||
},
|
||||
|
||||
_showPopup: function (element) {
|
||||
var id = $(element).attr(this.selectors.productIdAttr),
|
||||
form = $(this.selectors.formClass);
|
||||
|
||||
if (!form.length) {
|
||||
form = this._getFilledForm(id);
|
||||
} else {
|
||||
if (form.find(this.selectors.hideProductIdName).length === 0) {
|
||||
form.append(
|
||||
$('<input>', {
|
||||
'name': this.selectors.hideProductId,
|
||||
'type': 'hidden',
|
||||
'value': id
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!form) {
|
||||
console.warn('We can`t find the form for displaying. Please check your module configuration.');
|
||||
}
|
||||
|
||||
$.fancyambox.open(form, {
|
||||
touch: false
|
||||
});
|
||||
},
|
||||
|
||||
_getFilledForm: function (id) {
|
||||
var form = $(this.selectors.formId),
|
||||
product = this.products[id];
|
||||
|
||||
if (!form.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var productName = form.find(this.selectors.productName);
|
||||
if (productName && product) {
|
||||
productName.html(product);
|
||||
}
|
||||
|
||||
var productId = form.find('[name="product_id"]');
|
||||
if (productId) {
|
||||
productId.val(id);
|
||||
}
|
||||
|
||||
var name = form.find('[name="name"]');
|
||||
if (name && this.customer.name) {
|
||||
name.val(this.customer.name);
|
||||
}
|
||||
|
||||
var phone = form.find('[name="phone"]');
|
||||
if (phone && this.customer.phone) {
|
||||
phone.val(this.customer.phone);
|
||||
}
|
||||
|
||||
var email = form.find('[name="email"]');
|
||||
if (email && this.customer.email) {
|
||||
email.val(this.customer.email);
|
||||
}
|
||||
|
||||
var self = this;
|
||||
form.on('submit', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
e.stopPropagation();
|
||||
|
||||
var validator = $(this).validation({ radioCheckboxClosest: '.nested'});
|
||||
if (validator.valid()) {
|
||||
self.submitForm($(this));
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
return form;
|
||||
},
|
||||
|
||||
submitForm: function (form) {
|
||||
form = $(form);
|
||||
var self = this;
|
||||
|
||||
var data = form.serialize();
|
||||
this._clearForm(form);
|
||||
|
||||
$.ajax({
|
||||
url: self.url,
|
||||
data: data,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(self.selectors.fancyBoxContainer).remove();
|
||||
$.fancyambox.getInstance().showLoading();
|
||||
},
|
||||
success: function (response) {
|
||||
$.fancyambox.getInstance().hideLoading();
|
||||
var result = $('<div>',
|
||||
{class: 'message'}
|
||||
);
|
||||
var html = $('<div>');
|
||||
|
||||
if (response.success) {
|
||||
html.html(response.success).appendTo(result);
|
||||
result.addClass(self.selectors.successMessage);
|
||||
}
|
||||
|
||||
if (response.error) {
|
||||
html.html(response.error).appendTo(result);
|
||||
result.addClass(self.selectors.errorMessage);
|
||||
}
|
||||
|
||||
$.fancyambox.close();
|
||||
$.fancyambox.open(result);
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
$.fancyambox.getInstance().hideLoading();
|
||||
$.fancyambox.close();
|
||||
$.fancyambox.open(errorThrown);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_clearForm: function (form) {
|
||||
var key = form.find('[name="form_key"]'),
|
||||
value = key.val();
|
||||
|
||||
$(form)[0].reset();
|
||||
key.val(value);
|
||||
}
|
||||
});
|
||||
|
||||
window.amHidePriceForm = amHidePriceForm();
|
||||
|
||||
return window.amHidePriceForm;
|
||||
});
|
||||
Vendored
Executable
+1
File diff suppressed because one or more lines are too long
Vendored
Executable
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* Amasty swatch render mixin. Hiding simple product price that is part of configurable product
|
||||
*/
|
||||
|
||||
define([
|
||||
'jquery',
|
||||
'underscore',
|
||||
], function ($, _) {
|
||||
'use strict';
|
||||
|
||||
return function (widget) {
|
||||
$.widget('mage.SwatchRenderer', widget, {
|
||||
options: {
|
||||
selectors: {
|
||||
buttons: '.box-tocart, .tocart',
|
||||
dataOptionSelected: 'data-option-selected',
|
||||
optionSelected: 'option-selected',
|
||||
dataAttributeId: 'data-attribute-id',
|
||||
attributeId: 'attribute-id'
|
||||
}
|
||||
},
|
||||
|
||||
_UpdatePrice: function () {
|
||||
var $widget = this,
|
||||
$selectors = $widget.options.selectors,
|
||||
$product = $widget.element.parents($widget.options.selectorProduct),
|
||||
$productPrice = $product.find($widget.options.selectorProductPrice),
|
||||
$productButton = $product.find($selectors.buttons),
|
||||
attributeClass = $widget.options.classes.attributeClass,
|
||||
selectedDataOptionSelector = '.' + attributeClass + '[' + $selectors.dataOptionSelected + ']',
|
||||
selectedOptionSelector = '.' + attributeClass + '[' + $selectors.optionSelected + ']',
|
||||
options = _.object(_.keys($widget.optionsMap), {}),
|
||||
selectedValues = [],
|
||||
result,
|
||||
isNotAllSelected;
|
||||
|
||||
$widget.element
|
||||
.find(selectedDataOptionSelector + ', ' + selectedOptionSelector)
|
||||
.each(function () {
|
||||
var attributeId = $(this).attr($selectors.dataAttributeId)
|
||||
|| $(this).attr($selectors.attributeId);
|
||||
|
||||
options[attributeId] = $(this).attr($selectors.dataOptionSelected)
|
||||
|| $(this).attr($selectors.optionSelected);
|
||||
});
|
||||
|
||||
for (const property in options) {
|
||||
selectedValues.push(options[property]);
|
||||
}
|
||||
|
||||
isNotAllSelected = selectedValues.some(function (element) {
|
||||
return typeof element === 'undefined';
|
||||
});
|
||||
|
||||
result = $widget._getNewPrices();
|
||||
|
||||
if (!isNotAllSelected) {
|
||||
this._super();
|
||||
}
|
||||
|
||||
if (result && result.finalPrice && result.finalPrice.amount === 0 && !isNotAllSelected) {
|
||||
$productPrice.hide();
|
||||
$productButton.hide();
|
||||
} else {
|
||||
$productPrice.show();
|
||||
$productButton.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return $.mage.SwatchRenderer;
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,48 @@
|
||||
define([
|
||||
'jquery'
|
||||
], function ($) {
|
||||
'use strict';
|
||||
|
||||
return function (widget) {
|
||||
$.widget('mage.validation', widget, {
|
||||
listenFormValidateHandler: function (event, validation) {
|
||||
var firstActive = $(validation.errorList[0].element || []),
|
||||
lastActive = $(validation.findLastActive() || validation.errorList.length && validation.errorList[0].element || []),
|
||||
parent, windowHeight, successList,
|
||||
noFocus = validation.currentForm.dataset.nofocus ? validation.currentForm.dataset.nofocus : false;
|
||||
|
||||
if (lastActive.is(':hidden')) {
|
||||
parent = lastActive.parent();
|
||||
windowHeight = $(window).height();
|
||||
$('html, body').animate({
|
||||
scrollTop: parent.offset().top - windowHeight / 2
|
||||
});
|
||||
}
|
||||
|
||||
// ARIA (removing aria attributes if success)
|
||||
successList = validation.successList;
|
||||
|
||||
if (successList.length) {
|
||||
$.each(successList, function () {
|
||||
$(this)
|
||||
.removeAttr('aria-describedby')
|
||||
.removeAttr('aria-invalid');
|
||||
});
|
||||
}
|
||||
|
||||
// Override -- Added focus status for form to include disabling focus functionality //
|
||||
if (firstActive.length && !noFocus) {
|
||||
$('html, body').stop().animate({
|
||||
scrollTop: firstActive.offset().top
|
||||
});
|
||||
firstActive.focus();
|
||||
} else {
|
||||
$(window).unbind('scroll');
|
||||
}
|
||||
// Override //
|
||||
}
|
||||
});
|
||||
|
||||
return $.mage.validation;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user