Skip to content
Snippets Groups Projects
Commit e0bd78e4 authored by Masami  Suzuki's avatar Masami Suzuki Committed by Yas Naoi
Browse files

Issue #3271364 by Masami, yas: Disable related fields while processing AJAX on...

Issue #3271364 by Masami, yas: Disable related fields while processing AJAX on AWS Cloud launch template form
parent cc067570
No related branches found
No related tags found
5 merge requests!1759Issue #3356778: Release 5.1.1,!1679Issue #3349074: Fix the OpenStack Project create and edit form in SPA that "Member" cannot be saved due to a validation error,!1607Issue #3343582: Add the function to preview OpenStack stack in the SPA,!1032Issue #3284576: Release 5.0.0-alpha2,!832Issue #3274116: Refactor composer.json to use docomoinnovations/drupal-extension
......@@ -186,6 +186,26 @@
$('#edit-field-image-id').select2({width: '100%'});
}
if (target === 'field_instance_type') {
$('#edit-field-image-id').prop('disabled', false);
}
if (target === 'field_image_id') {
$('#edit-field-instance-type').prop('disabled', false);
}
});
$(document).ajaxSend(function (event, xhr, settings) {
let target = settings.extraData._triggering_element_name;
if (target === 'field_instance_type') {
$('#edit-field-image-id').prop('disabled', true);
}
if (target === 'field_image_id') {
$('#edit-field-instance-type').prop('disabled', true);
}
});
})(jQuery);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment