mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Form-generator
Change handling of labelBind in form generator. It now adds ng-bind directive to a <span> element inside <label> rather than to <label> directly. This stops Angular from wiping out anything else we may want to add inside <label> like help icon.
This commit is contained in:
parent
22f7dfce67
commit
7093e95011
@ -530,7 +530,6 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
||||
var html = '';
|
||||
if (field.label || field.labelBind) {
|
||||
html += "<label ";
|
||||
html += (field.labelBind) ? "ng-bind=\"" + field.labelBind + "\" " : "";
|
||||
if (horizontal || field.labelClass) {
|
||||
html += "class=\"";
|
||||
html += (field.labelClass) ? field.labelClass : "";
|
||||
@ -540,7 +539,11 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
||||
html += (field.labelNGClass) ? "ng-class=\"" + field.labelNGClass + "\" " : "";
|
||||
html += "for=\"" + fld + '">';
|
||||
html += (field.icon) ? Icon(field.icon) : "";
|
||||
html += "<span class=\"label-text\">" + field.label + "</span>";
|
||||
if (field.labelBind) {
|
||||
html += "<span class=\"label-text\" ng-bind=\"" + field.labelBind + "\"></span>";
|
||||
} else {
|
||||
html += "<span class=\"label-text\">" + field.label + "</span>";
|
||||
}
|
||||
html += (field.awPopOver && !field.awPopOverRight) ? Attr(field, 'awPopOver', fld) : "";
|
||||
html += "</label>\n";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user