Commit 26f27bae authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-5880: adding js to ensure required is in correct place for banners

parent fbfff313
......@@ -12,3 +12,19 @@
};
}
})(jQuery, Drupal);
/**
* Adding required to banner images image field.
*/
(function ($, Drupal) {
Drupal.behaviors.uwBannerImageRequire = {
attach: function (context, settings) {
$(document).ready(function() {
if ($("[id^=field_uw_ban_image-media-library-wrapper]").hasClass('form-required')) {
$("[id^=field_uw_ban_image-media-library-wrapper]").removeClass('form-required');
$("[id^=field_uw_ban_image-media-library-wrapper] legend span").addClass('form-required');
}
});
}
};
})(jQuery, Drupal);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment