1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

AC-183 Fixed issues on permissions form.

This commit is contained in:
chouseknecht 2013-07-03 14:02:52 -04:00
parent 4256631362
commit 7d23d29eaf
2 changed files with 6 additions and 2 deletions

View File

@ -193,6 +193,10 @@ function PermissionsEdit ($scope, $rootScope, $compile, $location, $log, $routeP
scope.category = 'Deploy';
if (data['permission_type'] != 'run' && data['permission_type'] != 'check' ) {
scope.category = 'Inventory';
scope.projectrequired = false;
}
else {
scope.projectrequired = true;
}
master['category'] = scope.category;

View File

@ -457,8 +457,8 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
html += "</label>\n";
}
if ( (options.mode == 'add' && field.addRequired) || (options.mode == 'edit' && field.editRequired) ) {
html += "<span class=\"error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$dirty && " +
this.form.name + '_form.' + fld + ".$error.required\">A value is required!</span>\n";
html += "<p><span class=\"error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$dirty && " +
this.form.name + '_form.' + fld + ".$error.required\">A value is required!</span></p>\n";
}
html += "<p><span class=\"error api-error\" ng-bind=\"" + fld + "_api_error\"></span></p>\n";
html += "</div>\n";