Skip to content

Commit eceac0c

Browse files
author
Olexandr Lysenko
committed
Merge remote-tracking branch 'mainline/develop' into bugfixes
2 parents cdb6f57 + 12602c4 commit eceac0c

File tree

5 files changed

+124
-71
lines changed

5 files changed

+124
-71
lines changed

app/code/Magento/Customer/view/frontend/requirejs-config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ var config = {
1010
address: 'Magento_Customer/address',
1111
changeEmailPassword: 'Magento_Customer/change-email-password',
1212
passwordStrengthIndicator: 'Magento_Customer/js/password-strength-indicator',
13-
zxcvbn: 'Magento_Customer/js/zxcvbn'
13+
zxcvbn: 'Magento_Customer/js/zxcvbn',
14+
addressValidation: 'Magento_Customer/js/addressValidation'
1415
}
1516
}
1617
};

app/code/Magento/Customer/view/frontend/templates/address/edit.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
<script type="text/x-magento-init">
204204
{
205205
"#form-validate": {
206-
"validation": {}
206+
"addressValidation": {}
207207
},
208208
"#country": {
209209
"regionUpdater": {
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* Copyright © 2016 Magento. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
/*jshint browser:true jquery:true*/
6+
define([
7+
'jquery',
8+
'jquery/ui',
9+
'validation'
10+
], function ($) {
11+
'use strict';
12+
13+
$.widget('mage.addressValidation', {
14+
options: {
15+
selectors: {
16+
button: '[data-action=save-address]'
17+
}
18+
},
19+
20+
/**
21+
* Validation creation
22+
* @protected
23+
*/
24+
_create: function () {
25+
var button = $(this.options.selectors.button, this.element);
26+
27+
this.element.validation({
28+
29+
/**
30+
* Submit Handler
31+
* @param {Element} form - address form
32+
*/
33+
submitHandler: function (form) {
34+
35+
button.attr('disabled', true);
36+
form.submit();
37+
}
38+
});
39+
}
40+
});
41+
42+
return $.mage.addressValidation;
43+
});

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
"zendframework/zend-serializer": "~2.4.6",
3232
"zendframework/zend-log": "~2.4.6",
3333
"zendframework/zend-http": "~2.4.6",
34-
"magento/zendframework1": "1.12.16",
34+
"magento/zendframework1": "~1.12.16",
3535
"colinmollenhour/credis": "1.6",
36-
"colinmollenhour/php-redis-session-abstract": "1.1",
36+
"colinmollenhour/php-redis-session-abstract": "1.2",
3737
"colinmollenhour/cache-backend-redis": "1.9",
3838
"colinmollenhour/cache-backend-file": "1.4",
3939
"composer/composer": "1.0.0-beta1",

0 commit comments

Comments
 (0)