cloud-8.x-2.0-beta1/modules/cloud_service_providers/aws_cloud/js/aws_cloud_config.js
modules/cloud_service_providers/aws_cloud/js/aws_cloud_config.js
(function ($, Drupal) {
'use strict';
Drupal.CloudConfig = Drupal.CloudConfig || {};
Drupal.CloudConfig = {
showHide: function (element) {
if ($(element).is(':checked')) {
$('#edit-field-access-key-wrapper').hide();
$('#edit-field-secret-key-wrapper').hide();
}
else {
$('#edit-field-access-key-wrapper').show();
$('#edit-field-secret-key-wrapper').show();
}
}
};
Drupal.behaviors.cloudConfig = {
attach: function (context, settings) {
$('#edit-field-use-instance-credentials-value', context).change(function () {
Drupal.CloudConfig.showHide(this);
});
Drupal.CloudConfig.showHide($('#edit-field-use-instance-credentials-value'));
}
};
})(jQuery, Drupal);
