mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 05:31:22 -03:30
hintText form option
Add hintText:"some helpful text here" to a field in a form definition object. Form generator will display the text inside the <label> element on a new line with the fa-info-circle icon in a pleasant grey color.
This commit is contained in:
parent
5c7152dec1
commit
0a44de3346
@ -238,6 +238,7 @@ angular.module('CredentialFormDefinition', [])
|
||||
variable: 'key_required',
|
||||
init: true
|
||||
},
|
||||
hintText:"drag and drop an SSH private key file on the field below",
|
||||
addRequired: false,
|
||||
editRequired: false,
|
||||
awDropFile: true,
|
||||
|
||||
@ -480,6 +480,16 @@ dd {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.label-hint-text {
|
||||
font-weight: normal;
|
||||
color: @grey;
|
||||
}
|
||||
.label-hint-text:before {
|
||||
/* for a line break before hintText */
|
||||
content: '\A';
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#group_form #group_tabs {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
@ -545,6 +545,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
||||
html += "<span class=\"label-text\">" + field.label + "</span>";
|
||||
}
|
||||
html += (field.awPopOver && !field.awPopOverRight) ? Attr(field, 'awPopOver', fld) : "";
|
||||
html += (field.hintText) ? " <span class=\"label-hint-text\"><i class=\"fa fa-info-circle\"></i> Hint: " + field.hintText + "</span>" : "";
|
||||
html += "</label>\n";
|
||||
}
|
||||
return html;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user