It looks like a checkbox, converted to a 'checkboxpicker' can still be changed even though it has been set to readonly. The state of the button changes to dimmed (e.g. disabled) but i can still click on it and it updates the state of the checkbox.
Changing this:
click: function(event) {
// Strictly event.currentTarget. Fix #19
var $button = $(event.currentTarget);
if (!$button.hasClass('active') || this.options.switchAlways) {
this.change();
}
}
To this fixed the issue:
click: function(event) {
// Strictly event.currentTarget. Fix #19
var $button = $(event.currentTarget);
if ($button.hasClass('disabled')) {
return;
}
if (!$button.hasClass('active') || this.options.switchAlways) {
this.change();
}
},
It looks like a checkbox, converted to a 'checkboxpicker' can still be changed even though it has been set to readonly. The state of the button changes to dimmed (e.g. disabled) but i can still click on it and it updates the state of the checkbox.
Changing this:
To this fixed the issue: