mirror of
https://github.com/ansible/awx.git
synced 2026-08-05 12:30:02 -02:30
AC-697 Dynamic help on Permissions page based on Permission Type. Uses a help collapse. Added ngBind support to help collapse, allowing the controller to set a scope variable to an html string. Added a Permissions.js helper to share setting help text and other defaults whenever permission type changes.
This commit is contained in:
@@ -346,8 +346,9 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
params.hdr = collapse_array[i].hdr;
|
||||
params.content = collapse_array[i].content;
|
||||
params.idx = this.accordion_count++;
|
||||
params.show = (collapse_array[i].show) ? collapse_array[i].show : null;
|
||||
html += HelpCollapse(params);
|
||||
params.show = (collapse_array[i].show) ? collapse_array[i].show : null;
|
||||
params.bind = (collapse_array[i].ngBind) ? collapse_array[i].ngBind : null;
|
||||
html += HelpCollapse(params);
|
||||
}
|
||||
return html;
|
||||
},
|
||||
@@ -839,6 +840,10 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required!</div>\n";
|
||||
}
|
||||
html += "<div class=\"error api-error\" ng-bind=\"" + fld + "_api_error\"></div>\n";
|
||||
|
||||
// Add help panel(s)
|
||||
html += (field.helpCollapse) ? this.buildHelpCollapse(field.helpCollapse) : '';
|
||||
|
||||
html += "</div>\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user