mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 21:51:26 -03:30
conditionally disable forms based on license type (#6589)
This commit is contained in:
parent
c0923729e2
commit
59cc15b0d4
@ -99,7 +99,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
save: {
|
||||
ngClick: 'vm.formSave()',
|
||||
ngDisabled: true
|
||||
ngDisabled: "license_type !== 'enterprise' || form.$invalid || form.$pending"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -38,7 +38,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
save: {
|
||||
ngClick: 'vm.formSave()',
|
||||
ngDisabled: true
|
||||
ngDisabled: "license_type !== 'enterprise' || form.$invalid || form.$pending"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -91,7 +91,7 @@ export default ['i18n', function(i18n) {
|
||||
},
|
||||
save: {
|
||||
ngClick: 'vm.formSave()',
|
||||
ngDisabled: true
|
||||
ngDisabled: "license_type !== 'enterprise' || form.$invalid || form.$pending"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -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] = '{}';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user