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:
Chris Houseknecht
2013-12-20 23:48:04 +00:00
parent d02d2ebf15
commit 7ef25fec57
14 changed files with 19 additions and 72 deletions

View File

@@ -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'] : "";