mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
Making error messages nicer, first pass
This commit is contained in:
parent
9447c092ac
commit
53db7b7224
@ -120,7 +120,7 @@ function Authenticate($log, $cookieStore, $compile, $window, $rootScope, $locati
|
||||
"<div class=\"col-md-8 col-sm-8 col-xs-9\">\n" +
|
||||
"<input type=\"text\" name=\"login_username\" class=\"form-control\" ng-model=\"login_username\"" +
|
||||
"id=\"login-username\" autocomplete=\"off\" required>\n" +
|
||||
"<div class=\"error\" ng-show=\"loginForm.login_username.$dirty && loginForm.login_username.$error.required\">A value is required!</div>\n" +
|
||||
"<div class=\"error\" ng-show=\"loginForm.login_username.$dirty && loginForm.login_username.$error.required\">A value is required.</div>\n" +
|
||||
"<div class=\"error api-error\" ng-bind=\"usernameError\"></div>\n" +
|
||||
"</div>\n" +
|
||||
"</div>\n" +
|
||||
@ -129,7 +129,7 @@ function Authenticate($log, $cookieStore, $compile, $window, $rootScope, $locati
|
||||
"<div class=\"col-md-8 col-sm-8 col-xs-9\">\n" +
|
||||
"<input type=\"password\" name=\"login_password\" id=\"login-password\" class=\"form-control\"" +
|
||||
"ng-model=\"login_password\" required autocomplete=\"off\">\n" +
|
||||
"<div class=\"error\" ng-show=\"loginForm.login_password.$dirty && loginForm.login_password.$error.required\">A value is required!</div>\n" +
|
||||
"<div class=\"error\" ng-show=\"loginForm.login_password.$dirty && loginForm.login_password.$error.required\">A value is required.</div>\n" +
|
||||
"<div class=\"error api-error\" ng-bind=\"passwordError\"></div>\n" +
|
||||
"</div>\n" +
|
||||
"</div>\n" +
|
||||
|
||||
@ -30,7 +30,7 @@ angular.module('SurveyMakerFormDefinition', [])
|
||||
// '<label for="survey_name"><span class="label-text prepend-asterisk">Survey Name</span></label>
|
||||
// <div>'+
|
||||
// '<input type="text" ng-model="survey_name" name="survey_name" id="survey_maker_survey_name" class="form-control ng-pristine ng-invalid ng-invalid-required" required="" capitalize>'+
|
||||
// '<div class="error ng-hide" id="survey_maker-survey_name-required-error" ng-show="survey_maker_form.survey_name.$dirty && survey_maker_form.survey_name.$error.required">A value is required!</div>'+
|
||||
// '<div class="error ng-hide" id="survey_maker-survey_name-required-error" ng-show="survey_maker_form.survey_name.$dirty && survey_maker_form.survey_name.$error.required">A value is required.</div>'+
|
||||
// '<div class="error api-error ng-binding" id="survey_maker-survey_name-api-error" ng-bind="survey_name_api_error"></div>'+
|
||||
// '</div></div></div>'+
|
||||
// '<div class="col-sm-6"><div class="form-group">'+
|
||||
|
||||
@ -61,7 +61,7 @@ angular.module('SurveyQuestionFormDefinition', [])
|
||||
'user_id<br>host_name<br><div class="popover-footer"><span class="key">esc</span> or click to close</div>" '+
|
||||
'data-placement="right" data-container="body" data-title="Answer Variable Name" class="help-link" data-original-title="" title="" tabindex="-1"><i class="fa fa-question-circle"></i></a> </label>'+
|
||||
'<div><input type="text" ng-model="variable" name="variable" id="survey_question_variable" class="form-control ng-pristine ng-invalid ng-invalid-required" required="" aw-survey-variable-name>'+
|
||||
'<div class="error ng-hide" id="survey_question-variable-required-error" ng-show="survey_question_form.variable.$dirty && survey_question_form.variable.$error.required">A value is required!</div>'+
|
||||
'<div class="error ng-hide" id="survey_question-variable-required-error" ng-show="survey_question_form.variable.$dirty && survey_question_form.variable.$error.required">A value is required.</div>'+
|
||||
'<div class="error ng-hide" id="survey_question-variable-variable-error" ng-show="survey_question_form.variable.$dirty && survey_question_form.variable.$error.variable">The value contains an illegal character!</div>'+
|
||||
'<div class="error ng-hide" id=survey_question-variable-duplicate-error" ng-show="duplicate">This variable is already in use.</div>' +
|
||||
'<div class="error api-error ng-binding" id="survey_question-variable-api-error" ng-bind="variable_api_error"></div>'+
|
||||
@ -104,13 +104,13 @@ angular.module('SurveyQuestionFormDefinition', [])
|
||||
control:'<div class="row">'+
|
||||
'<div class="col-xs-6">'+
|
||||
'<label for="text_min"><span class="label-text">Minimum Length</span></label><input id="text_min" type="number" name="text_min" ng-model="text_min" min=0 aw-min="0" aw-max="text_max" class="form-control" integer />'+
|
||||
'<div class="error" ng-show="survey_question_form.text_min.$error.number || survey_question_form.text_min.$error.integer">This is not valid integer!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.text_min.$error.number || survey_question_form.text_min.$error.integer">This is not a valid integer.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.text_min.$error.awMax">Too high!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.text_min.$error.awMin">Too low!</div>'+
|
||||
'</div>'+
|
||||
'<div class="col-xs-6">'+
|
||||
'<label for="text_max"><span class="label-text">Maximum Length</span></label><input id="text_max" type="number" name="text_max" ng-model="text_max" aw-min="text_min || 0" class="form-control" integer >'+
|
||||
'<div class="error" ng-show="survey_question_form.text_max.$error.number || survey_question_form.text_max.$error.integer">This is not valid integer!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.text_max.$error.number || survey_question_form.text_max.$error.integer">This is not a valid integer.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.text_max.$error.awMin">Too low!</div>'+
|
||||
'</div>'+
|
||||
'</div>',
|
||||
@ -125,13 +125,13 @@ angular.module('SurveyQuestionFormDefinition', [])
|
||||
control:'<div class="row">'+
|
||||
'<div class="col-xs-6">'+
|
||||
'<label for="textarea_min"><span class="label-text">Minimum Length</span></label><input id="textarea_min" type="number" name="textarea_min" ng-model="textarea_min" min=0 aw-min="0" aw-max="textarea_max" class="form-control" integer />'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_min.$error.number || survey_question_form.textarea_min.$error.integer">This is not valid integer!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_min.$error.number || survey_question_form.textarea_min.$error.integer">This is not a valid integer.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_min.$error.awMax">Too high!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_min.$error.awMin">Too low!</div>'+
|
||||
'</div>'+
|
||||
'<div class="col-xs-6">'+
|
||||
'<label for="textarea_max"><span class="label-text">Maximum Length</span></label><input id="textarea_max" type="number" name="textarea_max" ng-model="textarea_max" aw-min="textarea_min || 0" class="form-control" integer >'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_max.$error.number || survey_question_form.textarea_max.$error.integer">This is not valid integer!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_max.$error.number || survey_question_form.textarea_max.$error.integer">This is not a valid integer.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_max.$error.awMin">Too low!</div>'+
|
||||
'</div>'+
|
||||
'</div>',
|
||||
@ -146,12 +146,12 @@ angular.module('SurveyQuestionFormDefinition', [])
|
||||
control:'<div class="row">'+
|
||||
'<div class="col-xs-6">'+
|
||||
'<label for="minimum"><span class="label-text">Minimum</span></label><input id="int_min" type="number" name="int_min" ng-model="int_min" aw-max="int_max" class="form-control" integer >'+
|
||||
'<div class="error" ng-show="survey_question_form.int_min.$error.number || survey_question_form.int_min.$error.integer">This is not valid integer!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.int_min.$error.number || survey_question_form.int_min.$error.integer">This is not a valid integer.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.int_min.$error.awMax">Too high!</div>'+
|
||||
'</div>'+
|
||||
'<div class="col-xs-6">'+
|
||||
'<label for="minimum"><span class="label-text">Maximum</span></label><input id="int_max" type="number" name="int_max" ng-model="int_max" aw-min="int_min" class="form-control" integer >'+
|
||||
'<div class="error" ng-show="survey_question_form.int_max.$error.number || survey_question_form.int_max.$error.integer">This is not valid integer!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.int_max.$error.number || survey_question_form.int_max.$error.integer">This is not a valid integer.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.int_max.$error.awMin">Too low!</div>'+
|
||||
'</div>'+
|
||||
'</div>',
|
||||
@ -166,12 +166,12 @@ angular.module('SurveyQuestionFormDefinition', [])
|
||||
control: '<div class="row">'+
|
||||
'<div class="col-xs-6">'+
|
||||
'<label for="minimum"><span class="label-text">Minimum</span></label><input id="float_min" type="number" name="float_min" ng-model="float_min" class="form-control" smart-float aw-max="float_max">'+
|
||||
'<div class="error" ng-show="survey_question_form.float_min.$error.float">This is not valid float!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.float_min.$error.float">This is not a valid decimal number.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.float_min.$error.awMax">Too high!</div>'+
|
||||
'</div>'+
|
||||
'<div class="col-xs-6">'+
|
||||
'<label for="maximum"><span class="label-text">Maximum</span></label><input id="float_max" type="number" name="float_max" ng-model="float_max" class="form-control" smart-float aw-min="float_min">'+
|
||||
'<div class="error" ng-show="survey_question_form.float_max.$error.float">This is not valid float!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.float_max.$error.float">This is not a valid decimal number.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.float_max.$error.awMin">Too low!</div>'+
|
||||
|
||||
'</div>'+
|
||||
@ -217,7 +217,7 @@ angular.module('SurveyQuestionFormDefinition', [])
|
||||
control: '<div>'+
|
||||
'<label for="default_int"><span class="label-text">Default Answer</span></label>'+
|
||||
'<input type="number" ng-model="default_int" name="default_int" aw-min="int_min" aw-max="int_max" class="form-control" integer />'+
|
||||
'<div class="error" ng-show="survey_question_form.default_int.$error.number || survey_question_form.default_int.$error.integer">This is not valid integer!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.default_int.$error.number || survey_question_form.default_int.$error.integer">This is not a valid integer.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.default_int.$error.awMin || survey_question_form.default_int.$error.awMax"> The value must be in range {{int_min}} to {{int_max}}!</div>'+
|
||||
'</div>',
|
||||
column: 2,
|
||||
@ -229,7 +229,7 @@ angular.module('SurveyQuestionFormDefinition', [])
|
||||
control: '<div>'+
|
||||
'<label for="default_float"><span class="label-text">Default Answer</span></label>'+
|
||||
'<input type="number" ng-model="default_float" name="default_float" aw-min="float_min" aw-max="float_max" class="form-control" />'+
|
||||
'<div class="error" ng-show="survey_question_form.default_float.$error.number || survey_question_form.default_float.$error.float">This is not valid float!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.default_float.$error.number || survey_question_form.default_float.$error.float">This is not a valid decimal number.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.default_float.$error.awMin || survey_question_form.default_float.$error.awMax"> The value must be in range {{float_min}} to {{float_max}}!</div>'+
|
||||
'</div>',
|
||||
column: 2,
|
||||
|
||||
@ -308,7 +308,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
html += " >";
|
||||
// Add error messages
|
||||
html += "<div class=\"error\" ng-show=\"job_launch_form." + fld + ".$dirty && " +
|
||||
"job_launch_form." + fld + ".$error.required\">A value is required!</div>\n";
|
||||
"job_launch_form." + fld + ".$error.required\">A value is required.</div>\n";
|
||||
html += "<div class=\"error api-error\" ng-bind=\"" + fld + "_api_error\"></div>\n";
|
||||
html += "</div>\n";
|
||||
|
||||
@ -330,7 +330,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
html += "/>";
|
||||
// Add error messages
|
||||
html += "<div class=\"error\" ng-show=\"job_launch_form." + fld + ".$dirty && " +
|
||||
"job_launch_form." + fld + ".$error.required\">A value is required!</span>\n";
|
||||
"job_launch_form." + fld + ".$error.required\">A value is required.</span>\n";
|
||||
html += (field.awPassMatch) ? "<span class=\"error\" ng-show=\"job_launch_form." + fld +
|
||||
".$error.awpassmatch\">Must match Password value</div>\n" : "";
|
||||
html += "<div class=\"error api-error\" ng-bind=\"" + fld + "_api_error\"></div>\n";
|
||||
@ -529,7 +529,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
'ng-minlength="'+minlength+'" ng-maxlength="'+maxlength+'" '+
|
||||
'class="form-control" ng-required='+question.required+'>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+ question.variable + '.$dirty && ' +
|
||||
'job_launch_form.'+question.variable+'.$error.required\">A value is required!</div>'+
|
||||
'job_launch_form.'+question.variable+'.$error.required\">A value is required.</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+ question.variable + '.$error.minlength || ' +
|
||||
'job_launch_form.'+question.variable+'.$error.maxlength\">The answer must be between {{'+minlength+'}} to {{'+maxlength+'}} characters long.</div>'+
|
||||
'<div class=\"error api-error\" ng-bind=\"" + fld + "_api_error\"></div>';
|
||||
@ -543,7 +543,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
'ng-minlength="'+minlength+'" ng-maxlength="'+maxlength+'" '+
|
||||
'class="form-control final" ng-required="'+question.required+'" rows="3"></textarea>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+ question.variable + '.$dirty && ' +
|
||||
'job_launch_form.'+question.variable+'.$error.required\">A value is required!</div>'+
|
||||
'job_launch_form.'+question.variable+'.$error.required\">A value is required.</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+ question.variable + '.$error.minlength || ' +
|
||||
'job_launch_form.'+question.variable+'.$error.maxlength\">The answer must be between {{'+minlength+'}} to {{'+maxlength+'}} characters long.</div>'+
|
||||
'<div class=\"error api-error\" ng-bind=\"" + fld + "_api_error\"></div>';
|
||||
@ -562,7 +562,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
'<span>'+choices[j] +'</span><br>' ;
|
||||
}
|
||||
html+= '<div class="error survey_error" ng-show="job_launch_form.'+ question.variable + '.$dirty && ' +
|
||||
'job_launch_form.'+question.variable+'.$error.required\">A value is required!</div>'+
|
||||
'job_launch_form.'+question.variable+'.$error.required\">A value is required.</div>'+
|
||||
'<div class=\"error api-error\" ng-bind=\"" + fld + "_api_error\"></div>';
|
||||
html+= '</div>'; //end survey_taker_input
|
||||
}
|
||||
@ -587,15 +587,15 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
//surveyCheckboxes takes a list of checkboxes and connects them to one scope variable
|
||||
html += '<survey-checkboxes name="'+question.variable+'" ng-model=" '+question.variable + '_object " ng-required="'+question.required+'">'+
|
||||
'</survey-checkboxes>{{job_launch_form.'+question.variable+'_object.$error.checkbox}}'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+question.variable+'.$error.checkbox">A value is required!</div>';
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+question.variable+'.$error.checkbox">A value is required.</div>';
|
||||
}
|
||||
|
||||
if(question.type === 'integer'){
|
||||
min = (!Empty(question.min)) ? Number(question.min) : "";
|
||||
max = (!Empty(question.max)) ? Number(question.max) : "" ;
|
||||
html+='<input type="number" id="'+question.variable+'" ng-model="'+question.variable+'" class="form-control" name="'+question.variable+'" ng-required="'+question.required+'" integer aw-min="'+min+'" aw-max="'+max+'" />'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+ question.variable + '.$dirty && job_launch_form.'+question.variable+'.$error.required">A value is required!</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+question.variable+'.$error.number || job_launch_form.'+question.variable+'.$error.integer" >This is not valid integer!</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+ question.variable + '.$dirty && job_launch_form.'+question.variable+'.$error.required">A value is required.</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+question.variable+'.$error.number || job_launch_form.'+question.variable+'.$error.integer" >This is not a valid integer.</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+question.variable+'.$error.awMin || job_launch_form.'+question.variable+'.$error.awMax"> The value must be in range {{'+min+'}} to {{'+max+'}}!</div>';
|
||||
|
||||
}
|
||||
@ -605,8 +605,8 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
max = (!Empty(question.max)) ? question.max : "" ;
|
||||
defaultValue = (!Empty(question.default)) ? question.default : (!Empty(question.default_float)) ? question.default_float : "" ;
|
||||
html+='<input type="number" id="'+question.variable+'" ng-model="'+question.variable+'" class=" form-control" name="'+question.variable+'" ng-required="'+question.required+'" smart-float aw-min="'+min+'" aw-max="'+max+'"/>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+ question.variable + '.$dirty && job_launch_form.'+question.variable+'.$error.required">A value is required!</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+question.variable+'.$error.number || job_launch_form.'+question.variable+'.$error.float">This is not valid float!</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+ question.variable + '.$dirty && job_launch_form.'+question.variable+'.$error.required">A value is required.</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+question.variable+'.$error.number || job_launch_form.'+question.variable+'.$error.float">This is not a valid decimal number.</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+question.variable+'.$error.awMin || job_launch_form.'+question.variable+'.$error.awMax"> The value must be in range {{'+min+'}} to {{'+max+'}}!</div>';
|
||||
}
|
||||
html+='</div>';
|
||||
|
||||
@ -776,11 +776,11 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
||||
if ((options.mode === 'add' && field.addRequired) || (options.mode === 'edit' && field.editRequired) ||
|
||||
field.awRequiredWhen) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-required-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$dirty && " +
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required!</div>\n";
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required.</div>\n";
|
||||
}
|
||||
if (field.type === "email") {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-email-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$dirty && " +
|
||||
this.form.name + '_form.' + fld + ".$error.email\">A valid email address is required!</div>\n";
|
||||
this.form.name + '_form.' + fld + ".$error.email\">A valid email address is required.</div>\n";
|
||||
}
|
||||
if (field.awPassMatch) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-passmatch-error\" ng-show=\"" + this.form.name + '_form.' + fld +
|
||||
@ -876,7 +876,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
||||
// Add error messages
|
||||
if ((options.mode === 'add' && field.addRequired) || (options.mode === 'edit' && field.editRequired)) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-required-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$dirty && " +
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required!</div>\n";
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required.</div>\n";
|
||||
}
|
||||
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" + fld + "_api_error\"></div>\n";
|
||||
html += "</div>\n";
|
||||
@ -916,7 +916,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
||||
if ((options.mode === 'add' && field.addRequired) || (options.mode === 'edit' && field.editRequired) ||
|
||||
field.awRequiredWhen) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-required-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$dirty && " +
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required!</div>\n";
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required.</div>\n";
|
||||
}
|
||||
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" + fld + "_api_error\"></div>\n";
|
||||
|
||||
@ -962,7 +962,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
||||
// Add error messages
|
||||
if ((options.mode === 'add' && field.addRequired) || (options.mode === 'edit' && field.editRequired)) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-required-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$dirty && " +
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required!</div>\n";
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required.</div>\n";
|
||||
}
|
||||
if (field.integer) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-integer-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$error.integer\">Must be an integer value</div>\n";
|
||||
@ -995,7 +995,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
||||
// Add error messages
|
||||
if ((options.mode === 'add' && field.addRequired) || (options.mode === 'edit' && field.editRequired)) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-required-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$dirty && " +
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required!</div>\n";
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required.</div>\n";
|
||||
}
|
||||
if (field.integer) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-integer-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$error.integer\">Must be an integer value</div>\n";
|
||||
@ -1066,7 +1066,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
||||
if ((options.mode === 'add' && field.addRequired) || (options.mode === 'edit' && field.editRequired)) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-required-error\" ng-show=\"" +
|
||||
this.form.name + '_form.' + fld + ".$dirty && " +
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required!</div>\n";
|
||||
this.form.name + '_form.' + fld + ".$error.required\">A value is required.</div>\n";
|
||||
}
|
||||
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" +
|
||||
fld + "_api_error\"></div>\n";
|
||||
@ -1145,7 +1145,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
||||
this.form.name + '_form.' +
|
||||
field.sourceModel + '_' + field.sourceField + ".$dirty && " +
|
||||
this.form.name + '_form.' + field.sourceModel + '_' + field.sourceField +
|
||||
".$error.required\">A value is required!</div>\n";
|
||||
".$error.required\">A value is required.</div>\n";
|
||||
}
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-notfound-error\" ng-show=\"" +
|
||||
this.form.name + '_form.' +
|
||||
|
||||
@ -26,6 +26,6 @@
|
||||
<form name="prompt_for_days_form" id="prompt_for_days_form">
|
||||
How many days of data would you like to <b>keep</b>? <br>
|
||||
<input type="number" min="1" id="days_to_keep" name="days_to_keep" value="30" ng-required="true" class="form-control ng-pristine ng-invalid-required ng-invalid" style="margin-top:10px;">
|
||||
<div class="error" ng-show="prompt_for_days_form.days_to_keep.$dirty && copy_form.new_copy_name.$error.required">A value is required!</div></input>
|
||||
<div class="error" ng-show="prompt_for_days_form.days_to_keep.$dirty && copy_form.new_copy_name.$error.required">A value is required.</div></input>
|
||||
</form>
|
||||
</div>
|
||||
@ -8,7 +8,7 @@
|
||||
<form name="copy_form" id="copy_form">
|
||||
What would you like to name the copy of job template <b><span id=job_name></span></b>?<br>
|
||||
<input id="new_copy_name" name="new_copy_name" ng-model ="new_copy_name" ng-required="true" class="form-control ng-pristine ng-invalid-required ng-invalid" style="margin-top:10px;">
|
||||
<div class="error survey_error ng-hide" ng-show="copy_form.new_copy_name.$dirty && copy_form.new_copy_name.$error.required">A value is required!</div></input>
|
||||
<div class="error survey_error ng-hide" ng-show="copy_form.new_copy_name.$dirty && copy_form.new_copy_name.$error.required">A value is required.</div></input>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -12,7 +12,7 @@
|
||||
<label class="control-label">Username:</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="login_username" ng-model="login_username" id="login-username" autocomplete="off" required><br />
|
||||
<span class="error" ng-show="loginForm.login_username.$dirty && loginForm.login_username.$error.required">A value is required!</span>
|
||||
<span class="error" ng-show="loginForm.login_username.$dirty && loginForm.login_username.$error.required">A value is required.</span>
|
||||
<span class="error api-error" ng-bind="usernameError"></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -20,7 +20,7 @@
|
||||
<label class="control-label">Password:</label>
|
||||
<div class="controls">
|
||||
<input type="password" name="login_password" id="login-password" ng-model="login_password" required autocomplete="off"><br />
|
||||
<span class="error" ng-show="loginForm.login_password.$dirty && loginForm.login_password.$error.required">A value is required!</span>
|
||||
<span class="error" ng-show="loginForm.login_password.$dirty && loginForm.login_password.$error.required">A value is required.</span>
|
||||
<span class="error api-error" ng-bind="passwordError"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -426,8 +426,8 @@
|
||||
<form name="prompt_for_days_form" id="prompt_for_days_form">
|
||||
How many days of data would you like to <b>keep</b>? <br>
|
||||
<input type="number" id="days_to_keep" name="days_to_keep" ng-model="days_to_keep" ng-required="true" class="form-control" aw-min=0 min=0 style="margin-top:10px;" integer></input>
|
||||
<div class="error" ng-show="prompt_for_days_form.days_to_keep.$dirty && prompt_for_days_form.days_to_keep.$error.required">A value is required!</div>
|
||||
<div class="error survey_error" ng-show="prompt_for_days_form.days_to_keep.$error.number || prompt_for_days_form.days_to_keep.$error.integer" >This is not valid integer!</div>
|
||||
<div class="error" ng-show="prompt_for_days_form.days_to_keep.$dirty && prompt_for_days_form.days_to_keep.$error.required">A value is required.</div>
|
||||
<div class="error survey_error" ng-show="prompt_for_days_form.days_to_keep.$error.number || prompt_for_days_form.days_to_keep.$error.integer" >This is not a valid integer.</div>
|
||||
<div class="error survey_error" ng-show="prompt_for_days_form.days_to_keep.$error.awMin"> This value cannot be negative!</div>
|
||||
|
||||
</form>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user