updated core from 8.4 to 8.5 : bug with login_destination
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
*/
|
||||
function dateFormatHandler(e) {
|
||||
const baseValue = $(e.target).val() || '';
|
||||
const dateString = baseValue.replace(/\\?(.?)/gi, (key, value) => dateFormats[key] ? dateFormats[key] : value);
|
||||
const dateString = baseValue.replace(/\\?(.?)/gi, (key, value) => (dateFormats[key] ? dateFormats[key] : value));
|
||||
|
||||
$preview.html(dateString);
|
||||
$target.toggleClass('js-hide', !dateString.length);
|
||||
|
||||
@@ -23,11 +23,10 @@
|
||||
attach(context) {
|
||||
// List of fields IDs on which to bind the event listener.
|
||||
// Create an array of IDs to use with jQuery.
|
||||
for (const sourceId in drupalSettings.copyFieldValue) {
|
||||
if (drupalSettings.copyFieldValue.hasOwnProperty(sourceId)) {
|
||||
ids.push(sourceId);
|
||||
}
|
||||
}
|
||||
Object.keys(drupalSettings.copyFieldValue || {}).forEach((element) => {
|
||||
ids.push(element);
|
||||
});
|
||||
|
||||
if (ids.length) {
|
||||
// Listen to value:copy events on all dependent fields.
|
||||
// We have to use body and not document because of the way jQuery events
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
|
||||
Drupal.behaviors.copyFieldValue = {
|
||||
attach: function attach(context) {
|
||||
for (var sourceId in drupalSettings.copyFieldValue) {
|
||||
if (drupalSettings.copyFieldValue.hasOwnProperty(sourceId)) {
|
||||
ids.push(sourceId);
|
||||
}
|
||||
}
|
||||
Object.keys(drupalSettings.copyFieldValue || {}).forEach(function (element) {
|
||||
ids.push(element);
|
||||
});
|
||||
|
||||
if (ids.length) {
|
||||
$('body').once('copy-field-values').on('value:copy', this.valueTargetCopyHandler);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user