Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Here is a bit of js that enhances the admin settings form, goes into colorbox_admin_settings.js
if ($("#edit-colorbox-login").attr('checked')) {
$("#edit-colorbox-login-form-wrapper").show();
}
else {
$("#edit-colorbox-login-form-wrapper").hide();
}
$("#edit-colorbox-login").change(function() {
if ($("#edit-colorbox-login").attr('checked')) {
$("#edit-colorbox-login-form-wrapper").show();
}
else {
$("#edit-colorbox-login-form-wrapper").hide();
}
});
It just hides the dropdown if the 'Enable for login links' checkbox is unchecked.
Comments
Comment #1
frjo CreditAttribution: frjo commentedGood suggestion, thanks!
Have committed a slightly different solution for it to 6-dev now. Please try it out.
Comment #2
hutch CreditAttribution: hutch commentedA better solution, I wasn't aware of the builtin js-hide class
Thanks!
Comment #3
frjo CreditAttribution: frjo commented