conditionally disable forms based on license type (#6589)

This commit is contained in:
Jake McDermott 2017-06-13 14:16:35 -04:00 committed by GitHub
parent c0923729e2
commit 59cc15b0d4
5 changed files with 9 additions and 5 deletions

View File

@ -99,7 +99,7 @@ export default ['i18n', function(i18n) {
},
save: {
ngClick: 'vm.formSave()',
ngDisabled: true
ngDisabled: "license_type !== 'enterprise' || form.$invalid || form.$pending"
}
}
};

View File

@ -38,7 +38,7 @@ export default ['i18n', function(i18n) {
},
save: {
ngClick: 'vm.formSave()',
ngDisabled: true
ngDisabled: "license_type !== 'enterprise' || form.$invalid || form.$pending"
}
}
};

View File

@ -91,7 +91,7 @@ export default ['i18n', function(i18n) {
},
save: {
ngClick: 'vm.formSave()',
ngDisabled: true
ngDisabled: "license_type !== 'enterprise' || form.$invalid || form.$pending"
}
}
};

View File

@ -35,7 +35,8 @@ export default ['i18n', function(i18n) {
TACACSPLUS_AUTH_PROTOCOL: {
type: 'select',
reset: 'TACACSPLUS_AUTH_PROTOCOL',
ngOptions: 'protocol.label for protocol in TACACSPLUS_AUTH_PROTOCOL_options track by protocol.value'
ngOptions: 'protocol.label for protocol in TACACSPLUS_AUTH_PROTOCOL_options track by protocol.value',
}
},
@ -50,7 +51,7 @@ export default ['i18n', function(i18n) {
},
save: {
ngClick: 'vm.formSave()',
ngDisabled: true
ngDisabled: "license_type !== 'enterprise' || form.$invalid || form.$pending"
}
}
};

View File

@ -83,6 +83,9 @@ export default [
}
} else {
if (key === "LICENSE") {
$scope.license_type = data[key].license_type;
}
//handle nested objects
if(ConfigurationUtils.isEmpty(data[key])) {
$scope[key] = '{}';