Commit 2ac203c0 authored by Olga Brani's avatar Olga Brani
Browse files

ui: Disable checked checkbox of forced networks

parent be9482a1
...@@ -406,6 +406,10 @@ ...@@ -406,6 +406,10 @@
check_disabled: function(view) { check_disabled: function(view) {
var disabled = this.disabled_filter(view.model); var disabled = this.disabled_filter(view.model);
// forced models are always disabled
if (view.model.get('forced')){
disabled = true;
}
if (disabled) { if (disabled) {
view.disable && view.disable(disabled); view.disable && view.disable(disabled);
if (_.isString(disabled)) { if (_.isString(disabled)) {
...@@ -867,7 +871,9 @@ ...@@ -867,7 +871,9 @@
set_disabled: function() { set_disabled: function() {
this.disabled = true; this.disabled = true;
this.deselect(); if (!this.model.get('forced')){
this.deselect();
}
this.input.attr("disabled", true); this.input.attr("disabled", true);
this.item.addClass("disabled"); this.item.addClass("disabled");
this.item.attr("disabled", true); this.item.attr("disabled", true);
......
Markdown is supported
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