mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-19 05:21:55 -06:00
handle disabled-indicator
This commit is contained in:
parent
b6737aff59
commit
2d7e5a57e7
@ -187,6 +187,12 @@ $(document).ready(function() {
|
||||
var results = $.map(data.results, function (obj) {
|
||||
obj.text = obj[element.getAttribute('display-field')] || obj.name;
|
||||
obj.id = obj[element.getAttribute('value-field')] || obj.id;
|
||||
|
||||
if(element.getAttribute('disabled-indicator') && obj[element.getAttribute('disabled-indicator')]) {
|
||||
// The disabled-indicator equated to true, so we disable this option
|
||||
console.log("hello");
|
||||
obj.disabled = true;
|
||||
}
|
||||
return obj;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user