mirror of
https://github.com/ansible/awx.git
synced 2026-08-04 20:10:01 -02:30
All form Save and Reset buttons now built with same icon, color, size. Fixed bug on Organization add/edit form that prevented Reset button from working. Fixed Jobs drop-down navigation menu- icon was missing on some pages.
This commit is contained in:
@@ -1202,10 +1202,22 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
html += "<div class=\"";
|
||||
html += (this.form.buttons['controlClass']) ? this.form.buttons['controlClass'] : "col-lg-6";
|
||||
html += " controls\">\n";
|
||||
|
||||
for (var btn in this.form.buttons) {
|
||||
if (typeof this.form.buttons[btn] == 'object') {
|
||||
var button = this.form.buttons[btn];
|
||||
//button
|
||||
|
||||
// Set default color and label for Save and Reset
|
||||
if (btn == 'save') {
|
||||
button.label = 'Save';
|
||||
button['class'] = 'btn-success';
|
||||
}
|
||||
if (btn == 'reset') {
|
||||
button.label = 'Reset';
|
||||
button['class'] = 'btn-default';
|
||||
}
|
||||
|
||||
// Build button HTML
|
||||
html += "<button type=\"button\" ";
|
||||
html += "class=\"btn btn-sm";
|
||||
html += (button['class']) ? " " + button['class'] : "";
|
||||
|
||||
Reference in New Issue
Block a user