mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Merge pull request #49 from ansible/make_errors_nice
Making error messages nicer
This commit is contained in:
commit
8bb8f67370
@ -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\">Please enter a username.</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\">Please enter a password.</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">Please enter a survey name.</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,9 +61,9 @@ 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-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 ng-hide" id="survey_question-variable-required-error" ng-show="survey_question_form.variable.$dirty && survey_question_form.variable.$error.required">Please enter an answer variable name.</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">Please remove the illegal character from the survey question variable name.</div>'+
|
||||
'<div class="error ng-hide" id=survey_question-variable-duplicate-error" ng-show="duplicate">This question variable is already in use. Please enter a different variable name.</div>' +
|
||||
'<div class="error api-error ng-binding" id="survey_question-variable-api-error" ng-bind="variable_api_error"></div>'+
|
||||
'</div>',
|
||||
addRequired: true,
|
||||
@ -104,14 +104,14 @@ 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.awMax">Too high!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.text_min.$error.awMin">Too low!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.text_min.$error.number || survey_question_form.text_min.$error.integer">The minimum length you entered is not a number. Please enter a number.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.text_min.$error.awMax">The minimium length is too high. Please enter a lower number.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.text_min.$error.awMin">The minimum length is too low. Please enter a positive number.</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.awMin">Too low!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.text_max.$error.number || survey_question_form.text_max.$error.integer">The maximum length you entered is not a number. Please enter a number.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.text_max.$error.awMin">The maximum length is too low. Please enter a number larger than the minimum length you set.</div>'+
|
||||
'</div>'+
|
||||
'</div>',
|
||||
ngShow: 'type.type==="text" ',
|
||||
@ -125,14 +125,14 @@ 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.awMax">Too high!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_min.$error.awMin">Too low!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_min.$error.number || survey_question_form.textarea_min.$error.integer">The minimum length you entered is not a number. Please enter a number.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_min.$error.awMax">The minimium length is too high. Please enter a lower number.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_min.$error.awMin">The minimum length is too low. Please enter a positive number.</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.awMin">Too low!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_max.$error.number || survey_question_form.textarea_max.$error.integer">The maximum length you entered is not a number. Please enter a number.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.textarea_max.$error.awMin">The maximum length is too low. Please enter a number larger than the minimum length you set.</div>'+
|
||||
'</div>'+
|
||||
'</div>',
|
||||
ngShow: 'type.type==="textarea" ',
|
||||
@ -146,13 +146,13 @@ 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.awMax">Too high!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.int_min.$error.number || survey_question_form.int_min.$error.integer">Please enter a valid integer.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.int_min.$error.awMax">Please enter a smaller integer.</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.awMin">Too low!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.int_max.$error.number || survey_question_form.int_max.$error.integer">Please enter a valid integer.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.int_max.$error.awMin">Please enter a larger integer.</div>'+
|
||||
'</div>'+
|
||||
'</div>',
|
||||
ngShow: 'type.type==="integer" ',
|
||||
@ -166,13 +166,13 @@ 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.awMax">Too high!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.float_min.$error.float">Please enter a valid float.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.float_min.$error.awMax">Please enter a smaller float.</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.awMin">Too low!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.float_max.$error.float">Please enter a valid float.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.float_max.$error.awMin">Please enter a larger float.</div>'+
|
||||
|
||||
'</div>'+
|
||||
'</div>',
|
||||
@ -217,8 +217,8 @@ 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.awMin || survey_question_form.default_int.$error.awMax"> The value must be in range {{int_min}} to {{int_max}}!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.default_int.$error.number || survey_question_form.default_int.$error.integer">Please enter a valid integer.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.default_int.$error.awMin || survey_question_form.default_int.$error.awMax"> Please enter a value in the range of {{int_min}} to {{int_max}}.</div>'+
|
||||
'</div>',
|
||||
column: 2,
|
||||
ngShow: 'type.type === "integer" '
|
||||
@ -229,8 +229,8 @@ 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.awMin || survey_question_form.default_float.$error.awMax"> The value must be in range {{float_min}} to {{float_max}}!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.default_float.$error.number || survey_question_form.default_float.$error.float">Please enter a valid float.</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.default_float.$error.awMin || survey_question_form.default_float.$error.awMax"> Please enter a value in the range of {{float_min}} to {{float_max}}!</div>'+
|
||||
'</div>',
|
||||
column: 2,
|
||||
ngShow: 'type.type=== "float" '
|
||||
|
||||
@ -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\">Please enter a password.</div>\n";
|
||||
html += "<div class=\"error api-error\" ng-bind=\"" + fld + "_api_error\"></div>\n";
|
||||
html += "</div>\n";
|
||||
|
||||
@ -330,9 +330,9 @@ 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\">Please confirm the password.</span>\n";
|
||||
html += (field.awPassMatch) ? "<span class=\"error\" ng-show=\"job_launch_form." + fld +
|
||||
".$error.awpassmatch\">Must match Password value</div>\n" : "";
|
||||
".$error.awpassmatch\">This value does not match the password you entered previously. Please confirm that password.</div>\n" : "";
|
||||
html += "<div class=\"error api-error\" ng-bind=\"" + fld + "_api_error\"></div>\n";
|
||||
html += "</div>\n";
|
||||
}
|
||||
@ -529,9 +529,9 @@ 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\">Please enter an answer.</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>'+
|
||||
'job_launch_form.'+question.variable+'.$error.maxlength\">Please enter an answer between {{'+minlength+'}} to {{'+maxlength+'}} characters long.</div>'+
|
||||
'<div class=\"error api-error\" ng-bind=\"" + fld + "_api_error\"></div>';
|
||||
}
|
||||
|
||||
@ -543,9 +543,9 @@ 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\">Please enter an answer.</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>'+
|
||||
'job_launch_form.'+question.variable+'.$error.maxlength\">Please enter an answer 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\">Please select an answer.</div>'+
|
||||
'<div class=\"error api-error\" ng-bind=\"" + fld + "_api_error\"></div>';
|
||||
html+= '</div>'; //end survey_taker_input
|
||||
}
|
||||
@ -587,16 +587,16 @@ 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">Please select at least one answer.</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+'.$error.awMin || job_launch_form.'+question.variable+'.$error.awMax"> The value must be in range {{'+min+'}} to {{'+max+'}}!</div>';
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+ question.variable + '.$dirty && job_launch_form.'+question.variable+'.$error.required">Please enter an answer.</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+question.variable+'.$error.number || job_launch_form.'+question.variable+'.$error.integer" >Please enter an answer that is 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">Please enter an answer between {{'+min+'}} and {{'+max+'}}.</div>';
|
||||
|
||||
}
|
||||
|
||||
@ -605,9 +605,9 @@ 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+'.$error.awMin || job_launch_form.'+question.variable+'.$error.awMax"> The value must be in range {{'+min+'}} to {{'+max+'}}!</div>';
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+ question.variable + '.$dirty && job_launch_form.'+question.variable+'.$error.required">Please enter an answer.</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+question.variable+'.$error.number || job_launch_form.'+question.variable+'.$error.float">Please enter an answer that is a decimal number.</div>'+
|
||||
'<div class="error survey_error" ng-show="job_launch_form.'+question.variable+'.$error.awMin || job_launch_form.'+question.variable+'.$error.awMax">Please enter a decimal number between {{'+min+'}} and {{'+max+'}}.</div>';
|
||||
}
|
||||
html+='</div>';
|
||||
if(question.index === scope.survey_questions.length-1){
|
||||
|
||||
@ -19,14 +19,14 @@
|
||||
<div class="form-group">
|
||||
<label><span class="red-text">*</span> Name</label>
|
||||
<input type="text" class="form-control input-sm" name="schedulerName" id="schedulerName" ng-model="schedulerName" required placeholder="Schedule name">
|
||||
<div class="error" ng-show="scheduler_form.schedulerName.$dirty && scheduler_form.schedulerName.$error.required">Schedule name is required</div>
|
||||
<div class="error" ng-show="scheduler_form.schedulerName.$dirty && scheduler_form.schedulerName.$error.required">A schedule name is required.</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="cleanupJob">
|
||||
<label><span class="red-text">*</span>Days of data to keep</label>
|
||||
<input type="number" class="form-control input-sm" name="schedulerPurgeDays" id="schedulerPurgeDays" min="1" ng-model="schedulerPurgeDays" required placeholder="Days of data to keep">
|
||||
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$dirty && scheduler_form.schedulerPurgeDays.$error.required">A value is required</div>
|
||||
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$error.number">This is not valid number</div>
|
||||
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$dirty && scheduler_form.schedulerPurgeDays.$error.required">A value is required.</div>
|
||||
<div class="error" ng-show="scheduler_form.schedulerPurgeDays.$error.number">This is not a valid number.</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@ -53,7 +53,7 @@
|
||||
<span>:</span><input name="schedulerStartMinute" id="schedulerStartMinute" sch-spinner="scheduler_form" class="scheduler-time-spinner" ng-model="schedulerStartMinute" placeholder="MM" min="0" max="59" data-zero-pad="2" required ng-change="scheduleTimeChange()" >
|
||||
<span>:</span><input name="schedulerStartSecond" id="schedulerStartSecond" sch-spinner="scheduler_form" class="scheduler-time-spinner" ng-model="schedulerStartSecond" placeholder="SS" min="0" max="59" data-zero-pad="2" required ng-change="scheduleTimeChange()" >
|
||||
</div>
|
||||
<div class="error" ng-show="scheduler_startTime_error">Time must be in HH24:MM:SS format</div>
|
||||
<div class="error" ng-show="scheduler_startTime_error">The time must be in HH24:MM:SS format.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -96,7 +96,7 @@
|
||||
<input name="schedulerInterval" id="schedulerInterval" sch-spinner="scheduler_form" class="scheduler-spinner"
|
||||
ng-model="schedulerInterval" min="1" max="999" ng-change="resetError('scheduler_interval_error')">
|
||||
<label class="inline-label" ng-bind="schedulerIntervalLabel"></label>
|
||||
<div class="error" ng-show="scheduler_interval_error">Provide a value between 1 and 999</div>
|
||||
<div class="error" ng-show="scheduler_interval_error">Please provide a value between 1 and 999.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -111,7 +111,7 @@
|
||||
<div class="col-md-3" style="padding-top:5px">
|
||||
<input name="monthDay" id="monthDay" sch-spinner="scheduler_form" class="scheduler-spinner"
|
||||
ng-model="monthDay" min="1" max="31" ng-change="resetError('scheduler_monthDay_error')" >
|
||||
<div class="error" ng-show="scheduler_monthDay_error">Must be between 1 and 31</div>
|
||||
<div class="error" ng-show="scheduler_monthDay_error">The day must be between 1 and 31.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -148,7 +148,7 @@
|
||||
<div class="col-md-3 padding-top-slim">
|
||||
<input name="yearlyMonthDay" id="yearlyMonthDay" sch-spinner="scheduler_form" class="scheduler-spinner"
|
||||
ng-model="yearlyMonthDay" min="1" max="31" ng-change="resetError('scheduler_yearlyMonthDay_error')" >
|
||||
<div class="error" ng-show="scheduler_yearlyMonthDay_error">Must be between 1 and 31</div>
|
||||
<div class="error" ng-show="scheduler_yearlyMonthDay_error">The day must be between 1 and 31.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -190,7 +190,7 @@
|
||||
<button type="button" ng-class="weekDaySAClass" class="btn btn-default" data-value="SA" ng-click="setWeekday($event,'sa')">Sat</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="error" ng-show="scheduler_weekDays_error">Select one or more days</div>
|
||||
<div class="error" ng-show="scheduler_weekDays_error">Please select one or more days.</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@ -209,7 +209,7 @@
|
||||
ng-model="schedulerOccurrenceCount" min="1" max="999" on-change="resetError('scheduler_occurrenceCount_error')" >
|
||||
<label class="inline-label">Occurrence(s)</label>
|
||||
</div>
|
||||
<div class="error" ng-show="scheduler_occurrenceCount_error">Provide a value between 1 and 999</div>
|
||||
<div class="error" ng-show="scheduler_occurrenceCount_error">Please provide a value between 1 and 999.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" ng-show="schedulerEnd && schedulerEnd.value == 'on'">
|
||||
@ -222,7 +222,7 @@
|
||||
<i class="fa fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="error" ng-show="scheduler_endDt_error">Provide a valid date</div>
|
||||
<div class="error" ng-show="scheduler_endDt_error">Please provide a valid date.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -776,19 +776,19 @@ 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\">Please enter a value.</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\">Please enter a valid email address.</div>\n";
|
||||
}
|
||||
if (field.awPassMatch) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-passmatch-error\" ng-show=\"" + this.form.name + '_form.' + fld +
|
||||
".$error.awpassmatch\">Must match Password value</div>\n";
|
||||
".$error.awpassmatch\">This value does not match the password you entered previously. Please confirm that password.</div>\n";
|
||||
}
|
||||
if (field.awValidUrl) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-url-error\" ng-show=\"" + this.form.name + '_form.' + fld +
|
||||
".$error.awvalidurl\">URL must begin with ssh, http or https and may not contain '@'</div>\n";
|
||||
".$error.awvalidurl\">Please enter a URL that begins with ssh, http or https. The URL may not contain the '@' character. </div>\n";
|
||||
}
|
||||
|
||||
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" + fld + "_api_error\"></div>\n";
|
||||
@ -796,7 +796,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
||||
if (field.chkPass) {
|
||||
// complexity error
|
||||
html += "<div class=\"error\" ng-show=\"" + this.form.name + '_form.' + fld +
|
||||
".$error.complexity\">Password must be stronger</div>\n";
|
||||
".$error.complexity\">Please enter a stronger password (see strength bar below).</div>\n";
|
||||
|
||||
// progress bar
|
||||
html += "<div class=\"pw-progress\">\n";
|
||||
@ -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\">Please enter a value.</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\">Please select a value.</div>\n";
|
||||
}
|
||||
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" + fld + "_api_error\"></div>\n";
|
||||
|
||||
@ -962,15 +962,15 @@ 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\">Please enter a value.</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";
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-integer-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$error.integer\">Please enter a number.</div>\n";
|
||||
}
|
||||
if (field.min !== undefined || field.max !== undefined) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-minmax-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$error.min || " +
|
||||
this.form.name + '_form.' + fld + ".$error.max\">Must be an integer between " + field.min + " and ";
|
||||
html += (field.max !== undefined) ? field.max : 'unlimited';
|
||||
this.form.name + '_form.' + fld + ".$error.max\">Please enter a number greater than " + field.min;
|
||||
html += (field.max !== undefined) ? " and less than " + field.max + "." : ".";
|
||||
html += "</div>\n";
|
||||
}
|
||||
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" + fld + "_api_error\"></div>\n";
|
||||
@ -995,14 +995,14 @@ 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\">Please select at least one value.</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";
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-integer-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$error.integer\">Please select a number.</div>\n";
|
||||
}
|
||||
if (field.min || field.max) {
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-minmax-error\" ng-show=\"" + this.form.name + '_form.' + fld + ".$error.min || " +
|
||||
this.form.name + '_form.' + fld + ".$error.max\">Must be in range " + field.min + " to " +
|
||||
this.form.name + '_form.' + fld + ".$error.max\">Please select a number between " + field.min + " and " +
|
||||
field.max + "</div>\n";
|
||||
}
|
||||
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" + fld + "_api_error\"></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\">Please select a value.</div>\n";
|
||||
}
|
||||
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" +
|
||||
fld + "_api_error\"></div>\n";
|
||||
@ -1145,13 +1145,13 @@ 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\">Please select a value.</div>\n";
|
||||
}
|
||||
html += "<div class=\"error\" id=\"" + this.form.name + "-" + fld + "-notfound-error\" ng-show=\"" +
|
||||
this.form.name + '_form.' +
|
||||
field.sourceModel + '_' + field.sourceField + ".$dirty && " +
|
||||
this.form.name + '_form.' + field.sourceModel + '_' + field.sourceField +
|
||||
".$error.awlookup\">Value not found</div>\n";
|
||||
".$error.awlookup\">That value was not found. Please enter or select a valid value.</div>\n";
|
||||
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" + field.sourceModel + '_' + field.sourceField +
|
||||
"_api_error\"></div>\n";
|
||||
html += "</div>\n";
|
||||
|
||||
@ -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">Please enter the number of days you would like to keep this data.</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">Please enter a name for this job template copy.</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">Please enter a username.</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">Please enter a password.</span>
|
||||
<span class="error api-error" ng-bind="passwordError"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -426,9 +426,9 @@
|
||||
<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 survey_error" ng-show="prompt_for_days_form.days_to_keep.$error.awMin"> This value cannot be negative!</div>
|
||||
<div class="error" ng-show="prompt_for_days_form.days_to_keep.$dirty && prompt_for_days_form.days_to_keep.$error.required">Please enter the number of days you would like to keep this data.</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" >Please enter a valid number.</div>
|
||||
<div class="error survey_error" ng-show="prompt_for_days_form.days_to_keep.$error.awMin">Please enter a non-negative number.</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user