| 1 |
$(function() {
|
| 2 |
// Find the default format setting, and encode_form_id the name
|
| 3 |
var format = Drupal.settings.input_format_permissions_default_filter;
|
| 4 |
format = format.replace(/\]\[|\_|\s/g, '-');
|
| 5 |
|
| 6 |
// Find the checkboxes that represent the format
|
| 7 |
var checkboxes = $('input[id*="' + format + '"]');
|
| 8 |
|
| 9 |
// Disable them by default
|
| 10 |
checkboxes.attr('disabled', true);
|
| 11 |
|
| 12 |
// When the submit button is clicked, enable the checkboxes
|
| 13 |
$('#edit-submit').click(function() { checkboxes.attr('disabled', false); });
|
| 14 |
});
|