mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
Fixed incorrect use of jQuery.attr for setting disabled attribute
Occurance: select_widget Update to latest version of jQuery uncovered this issue. https://fedorahosted.org/freeipa/ticket/2817
This commit is contained in:
parent
8ce157910a
commit
1a94109f4a
@ -928,15 +928,13 @@ IPA.select_widget = function(spec) {
|
||||
|
||||
that.set_options_enabled = function(enabled, options) {
|
||||
|
||||
var html_value = enabled ? '' : 'disabled';
|
||||
|
||||
if (!options) {
|
||||
$('option', that.select).attr('disabled', html_value);
|
||||
$('option', that.select).prop('disabled', !enabled);
|
||||
} else {
|
||||
for (var i=0; i<options.length;i++) {
|
||||
var value = options[i];
|
||||
var option = $('option[value="'+value+'"]', that.select);
|
||||
option.attr('disabled', html_value);
|
||||
option.prop('disabled', !enabled);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user