Merge pull request #412 from jlmitch5/fixFormSaveEnterpriseDisabling

fix config forms from having save button disabled when no license is …
This commit is contained in:
jlmitch5 2017-09-18 09:37:30 -04:00 committed by GitHub
commit 37487b2427
5 changed files with 9 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -95,7 +95,11 @@ export default [
} else {
if (key === "LICENSE") {
$scope.license_type = data[key].license_type;
if (_.isEmpty(data[key])) {
$scope.license_type = "open";
} else {
$scope.license_type = data[key].license_type;
}
}
//handle nested objects
if(ConfigurationUtils.isEmpty(data[key])) {