mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Properly name the required asterisks class
This commit is contained in:
@@ -342,10 +342,6 @@ textarea.allowresize {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.foobar {
|
|
||||||
color: @red;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subtitle {
|
.subtitle {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -700,6 +700,10 @@ input[type='radio']:checked:before {
|
|||||||
width: 30px;
|
width: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Form-requiredAsterisk {
|
||||||
|
color: @red;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 650px) {
|
@media only screen and (max-width: 650px) {
|
||||||
.Form-formGroup {
|
.Form-formGroup {
|
||||||
flex: 1 0 auto;
|
flex: 1 0 auto;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default
|
|||||||
scope[fld] = '';
|
scope[fld] = '';
|
||||||
html += "<div class=\"form-group\">\n";
|
html += "<div class=\"form-group\">\n";
|
||||||
html += "<label for=\"" + fld + "\">";
|
html += "<label for=\"" + fld + "\">";
|
||||||
html += '<span class="foobar">*</span>';
|
html += '<span class="Form-requiredAsterisk">*</span>';
|
||||||
html += '<span>' + field.label + '</span>';
|
html += '<span>' + field.label + '</span>';
|
||||||
html += "</label>\n";
|
html += "</label>\n";
|
||||||
html += "<input type=\"password\" ";
|
html += "<input type=\"password\" ";
|
||||||
@@ -42,7 +42,7 @@ export default
|
|||||||
scope[fld] = '';
|
scope[fld] = '';
|
||||||
html += "<div class=\"form-group\">\n";
|
html += "<div class=\"form-group\">\n";
|
||||||
html += "<label for=\"" + fld + "\"> " + field.label + "</label>\n";
|
html += "<label for=\"" + fld + "\"> " + field.label + "</label>\n";
|
||||||
html += '<span class="foobar">*</span>';
|
html += '<span class="Form-requiredAsterisk">*</span>';
|
||||||
html += "<input type=\"password\" ";
|
html += "<input type=\"password\" ";
|
||||||
html += "ng-model=\"" + fld + '" ';
|
html += "ng-model=\"" + fld + '" ';
|
||||||
html += 'name="' + fld + '" ';
|
html += 'name="' + fld + '" ';
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
<form name="forms.credentialpasswords" autocomplete="off" novalidate>
|
<form name="forms.credentialpasswords" autocomplete="off" novalidate>
|
||||||
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="ssh_password_required">
|
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="ssh_password_required">
|
||||||
<label for="ssh_password" class="Form-inputLabelContainer">
|
<label for="ssh_password" class="Form-inputLabelContainer">
|
||||||
<span class="foobar">*</span>
|
<span class="Form-requiredAsterisk">*</span>
|
||||||
<span class="Form-inputLabel" translate> Password</span>
|
<span class="Form-inputLabel" translate> Password</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="ssh_key_unlock_required">
|
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="ssh_key_unlock_required">
|
||||||
<label for="ssh_key_unlock" class="Form-inputLabelContainer">
|
<label for="ssh_key_unlock" class="Form-inputLabelContainer">
|
||||||
<span class="foobar">*</span>
|
<span class="Form-requiredAsterisk">*</span>
|
||||||
<span class="Form-inputLabel" translate> Private Key Passphrase</span>
|
<span class="Form-inputLabel" translate> Private Key Passphrase</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="become_password_required">
|
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="become_password_required">
|
||||||
<label for="become_password" class="Form-inputLabelContainer">
|
<label for="become_password" class="Form-inputLabelContainer">
|
||||||
<span class="foobar">*</span>
|
<span class="Form-requiredAsterisk">*</span>
|
||||||
<span class="Form-inputLabel" translate> Privilege Escalation Password</span>
|
<span class="Form-inputLabel" translate> Privilege Escalation Password</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="vault_password_required">
|
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="vault_password_required">
|
||||||
<label for="vault_password" class="Form-inputLabelContainer">
|
<label for="vault_password" class="Form-inputLabelContainer">
|
||||||
<span class="foobar">*</span>
|
<span class="Form-requiredAsterisk">*</span>
|
||||||
<span class="Form-inputLabel" translate> Vault Password</span>
|
<span class="Form-inputLabel" translate> Vault Password</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="ask_verbosity_on_launch">
|
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="ask_verbosity_on_launch">
|
||||||
<label for="verbosity" class="Form-inputLabelContainer">
|
<label for="verbosity" class="Form-inputLabelContainer">
|
||||||
<span class="foobar">*</span>
|
<span class="Form-requiredAsterisk">*</span>
|
||||||
<span class="Form-inputLabel" translate> Verbosity</span>
|
<span class="Form-inputLabel" translate> Verbosity</span>
|
||||||
</label>
|
</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -198,7 +198,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="ask_job_type_on_launch">
|
<div class="form-group Form-formGroup Form-formGroup--singleColumn" ng-if="ask_job_type_on_launch">
|
||||||
<label for="job_type" class="Form-inputLabelContainer">
|
<label for="job_type" class="Form-inputLabelContainer">
|
||||||
<span class="foobar">*</span>
|
<span class="Form-requiredAsterisk">*</span>
|
||||||
<span class="Form-inputLabel" translate> Job Type</span>
|
<span class="Form-inputLabel" translate> Job Type</span>
|
||||||
</label>
|
</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -276,7 +276,7 @@
|
|||||||
<form name="forms.survey" autocomplete="off" novalidate>
|
<form name="forms.survey" autocomplete="off" novalidate>
|
||||||
<div ng-repeat="question in survey_questions" id="taker_'+question.index+'" class="form-group Form-formGroup Form-formGroup--singleColumn">
|
<div ng-repeat="question in survey_questions" id="taker_'+question.index+'" class="form-group Form-formGroup Form-formGroup--singleColumn">
|
||||||
<label ng-attr-for="{{question.variable}}" class="Form-inputLabelContainer">
|
<label ng-attr-for="{{question.variable}}" class="Form-inputLabelContainer">
|
||||||
<span ng-show="question.required===true" class="foobar">*</span>
|
<span ng-show="question.required===true" class="Form-requiredAsterisk">*</span>
|
||||||
<span class="label-text Form-inputLabel"> {{question.question_name}}</span>
|
<span class="label-text Form-inputLabel"> {{question.question_name}}</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
<form id="License-form" name="uploadlicense">
|
<form id="License-form" name="uploadlicense">
|
||||||
<div class="License-subTitleText">
|
<div class="License-subTitleText">
|
||||||
<span class="foobar">*</span>
|
<span class="Form-requiredAsterisk">*</span>
|
||||||
<translate>License File</translate>
|
<translate>License File</translate>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group License-file--container">
|
<div class="input-group License-file--container">
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
<input id="License-file" class="form-control" type="file" file-on-change="getKey"/>
|
<input id="License-file" class="form-control" type="file" file-on-change="getKey"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="License-subTitleText">
|
<div class="License-subTitleText">
|
||||||
<span class="foobar">*</span>
|
<span class="Form-requiredAsterisk">*</span>
|
||||||
<translate>End User License Agreement</translate>
|
<translate>End User License Agreement</translate>
|
||||||
</div>
|
</div>
|
||||||
<div id="eula_notice"
|
<div id="eula_notice"
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<dnd-nodrag>
|
<dnd-nodrag>
|
||||||
<div>
|
<div>
|
||||||
<label class="SurveyMaker-previewLabel" for="question.variable">
|
<label class="SurveyMaker-previewLabel" for="question.variable">
|
||||||
<span ng-show="question.required===true" class="foobar">*</span>
|
<span ng-show="question.required===true" class="Form-requiredAsterisk">*</span>
|
||||||
<span class="label-text"> {{question.question_name}}</span>
|
<span class="label-text"> {{question.question_name}}</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -417,14 +417,14 @@ function(ConfigurationUtils, i18n, $rootScope) {
|
|||||||
// Make a field required conditionally using an expression. If the expression evaluates to true, the
|
// Make a field required conditionally using an expression. If the expression evaluates to true, the
|
||||||
// field will be required. Otherwise, the required attribute will be removed.
|
// field will be required. Otherwise, the required attribute will be removed.
|
||||||
//
|
//
|
||||||
.directive('awRequiredWhen', ['$timeout', function($timeout) {
|
.directive('awRequiredWhen', function() {
|
||||||
return {
|
return {
|
||||||
require: 'ngModel',
|
require: 'ngModel',
|
||||||
compile: function(tElem) {
|
compile: function(tElem) {
|
||||||
return {
|
return {
|
||||||
pre: function preLink() {
|
pre: function preLink() {
|
||||||
let label = $(tElem).closest('.form-group').find('label').first();
|
let label = $(tElem).closest('.form-group').find('label').first();
|
||||||
$(label).prepend('<span class="foobar">*</span>');
|
$(label).prepend('<span class="Form-requiredAsterisk">*</span>');
|
||||||
},
|
},
|
||||||
post: function postLink( scope, elm, attrs, ctrl ) {
|
post: function postLink( scope, elm, attrs, ctrl ) {
|
||||||
function updateRequired() {
|
function updateRequired() {
|
||||||
@@ -436,13 +436,13 @@ function(ConfigurationUtils, i18n, $rootScope) {
|
|||||||
|
|
||||||
if (isRequired && (elm.attr('required') === null || elm.attr('required') === undefined)) {
|
if (isRequired && (elm.attr('required') === null || elm.attr('required') === undefined)) {
|
||||||
$(elm).attr('required', 'required');
|
$(elm).attr('required', 'required');
|
||||||
if(!$(label).find('span.foobar').length){
|
if(!$(label).find('span.Form-requiredAsterisk').length){
|
||||||
$(label).prepend('<span class="foobar">*</span>');
|
$(label).prepend('<span class="Form-requiredAsterisk">*</span>');
|
||||||
}
|
}
|
||||||
} else if (!isRequired) {
|
} else if (!isRequired) {
|
||||||
elm.removeAttr('required');
|
elm.removeAttr('required');
|
||||||
if (!attrs.awrequiredAlwaysShowAsterisk) {
|
if (!attrs.awrequiredAlwaysShowAsterisk) {
|
||||||
$(label).find('span.foobar')[0].remove();
|
$(label).find('span.Form-requiredAsterisk')[0].remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isRequired && (viewValue === undefined || viewValue === null || viewValue === '')) {
|
if (isRequired && (viewValue === undefined || viewValue === null || viewValue === '')) {
|
||||||
@@ -464,7 +464,7 @@ function(ConfigurationUtils, i18n, $rootScope) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}])
|
})
|
||||||
|
|
||||||
// awPlaceholder: Dynamic placeholder set to a scope variable you want watched.
|
// awPlaceholder: Dynamic placeholder set to a scope variable you want watched.
|
||||||
// Value will be place in field placeholder attribute.
|
// Value will be place in field placeholder attribute.
|
||||||
|
|||||||
@@ -639,7 +639,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
html += (field.labelNGClass) ? "ng-class=\"" + field.labelNGClass + "\" " : "";
|
html += (field.labelNGClass) ? "ng-class=\"" + field.labelNGClass + "\" " : "";
|
||||||
html += "for=\"" + fld + '">\n';
|
html += "for=\"" + fld + '">\n';
|
||||||
|
|
||||||
html += `${field.required ? '<span class="foobar">*</span>' : ''}`;
|
html += `${field.required ? '<span class="Form-requiredAsterisk">*</span>' : ''}`;
|
||||||
|
|
||||||
html += (field.icon) ? Icon(field.icon) : "";
|
html += (field.icon) ? Icon(field.icon) : "";
|
||||||
if (field.labelBind) {
|
if (field.labelBind) {
|
||||||
|
|||||||
Reference in New Issue
Block a user