Skip to content

Commit 7b3ab27

Browse files
author
Mohan Ahuja
committed
ACP2E-356: Cannot create a new customer from Admin if Customer Sharing setting is set to Global
- Using registry to update store id dropdown instead of accessing DOM element directly
1 parent 4e25ac5 commit 7b3ab27

File tree

1 file changed

+3
-1
lines changed
  • app/code/Magento/Customer/view/adminhtml/web/js/form/element

1 file changed

+3
-1
lines changed

app/code/Magento/Customer/view/adminhtml/web/js/form/element/website.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ define([
1717
*/
1818
onUpdate: function (value) {
1919
var groupIdFieldKey = 'group_id',
20+
sendEmailStoreIdFieldKey = 'sendemail_store_id',
2021
groupId = registry.get('index = ' + groupIdFieldKey),
22+
storeId = registry.get('index = ' + sendEmailStoreIdFieldKey),
2123
option = this.getOption(value);
2224

2325
if (groupId) {
2426
groupId.value(option[groupIdFieldKey]);
2527
}
2628

2729
if (option['default_store_view_id']) {
28-
document.getElementsByName('customer[sendemail_store_id]')[0].value = option['default_store_view_id'];
30+
storeId.value(option['default_store_view_id']);
2931
}
3032
return this._super();
3133
}

0 commit comments

Comments
 (0)