Issue #2941106 by droplet, idebr: Site email address in the install profile form is no longer copied to the user email address

8.6.x
Alex Pott 2018-02-12 10:45:21 +00:00
parent e96ab4e147
commit 3840ad24dc
2 changed files with 8 additions and 2 deletions

View File

@ -23,7 +23,10 @@
attach(context) { attach(context) {
// List of fields IDs on which to bind the event listener. // List of fields IDs on which to bind the event listener.
// Create an array of IDs to use with jQuery. // Create an array of IDs to use with jQuery.
Object.keys(drupalSettings.copyFieldValue || {}).forEach(ids.push); Object.keys(drupalSettings.copyFieldValue || {}).forEach((element) => {
ids.push(element);
});
if (ids.length) { if (ids.length) {
// Listen to value:copy events on all dependent fields. // Listen to value:copy events on all dependent fields.
// We have to use body and not document because of the way jQuery events // We have to use body and not document because of the way jQuery events

View File

@ -10,7 +10,10 @@
Drupal.behaviors.copyFieldValue = { Drupal.behaviors.copyFieldValue = {
attach: function attach(context) { attach: function attach(context) {
Object.keys(drupalSettings.copyFieldValue || {}).forEach(ids.push); Object.keys(drupalSettings.copyFieldValue || {}).forEach(function (element) {
ids.push(element);
});
if (ids.length) { if (ids.length) {
$('body').once('copy-field-values').on('value:copy', this.valueTargetCopyHandler); $('body').once('copy-field-values').on('value:copy', this.valueTargetCopyHandler);