1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

handle disabled-indicator

This commit is contained in:
John Anderson
2019-01-15 16:33:44 -05:00
parent b6737aff59
commit 2d7e5a57e7

View File

@ -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;
});