From a2121b7288f813ce68e3e6cede9179a890f6f594 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 17 Feb 2015 17:50:43 -0500 Subject: [PATCH] More accurate survey errors For the survey question form validation, some errors messages were being thrown for errors that hadn't occured. --- awx/ui/static/js/forms/SurveyQuestion.js | 16 ++++++------ awx/ui/static/lib/ansible/directives.js | 31 +++++++++++++++--------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/awx/ui/static/js/forms/SurveyQuestion.js b/awx/ui/static/js/forms/SurveyQuestion.js index d7d0fff516..fe50a0a236 100644 --- a/awx/ui/static/js/forms/SurveyQuestion.js +++ b/awx/ui/static/js/forms/SurveyQuestion.js @@ -63,8 +63,8 @@ export default 'user_id
host_name
esc or click to close
" '+ 'data-placement="right" data-container="body" data-title="Answer Variable Name" class="help-link" data-original-title="" title="" tabindex="-1"> '+ '
'+ - '
Please enter an answer variable name.
'+ - '
Please remove the illegal character from the survey question variable name.
'+ + '
Please enter an answer variable name.
'+ + '
Please remove the illegal character from the survey question variable name.
'+ '
This question variable is already in use. Please enter a different variable name.
' + '
'+ '
', @@ -106,13 +106,13 @@ export default control:'
'+ '
'+ ''+ - '
The minimum length you entered is not a number. Please enter a number.
'+ + '
The minimum length you entered is not a number. Please enter a number.
'+ '
The minimium length is too high. Please enter a lower number.
'+ '
The minimum length is too low. Please enter a positive number.
'+ '
'+ '
'+ ''+ - '
The maximum length you entered is not a number. Please enter a number.
'+ + '
The maximum length you entered is not a number. Please enter a number.
'+ '
The maximum length is too low. Please enter a number larger than the minimum length you set.
'+ '
'+ '
', @@ -127,13 +127,13 @@ export default control:'
'+ '
'+ ''+ - '
The minimum length you entered is not a number. Please enter a number.
'+ + '
The minimum length you entered is not a number. Please enter a number.
'+ '
The minimium length is too high. Please enter a lower number.
'+ '
The minimum length is too low. Please enter a positive number.
'+ '
'+ '
'+ ''+ - '
The maximum length you entered is not a number. Please enter a number.
'+ + '
The maximum length you entered is not a number. Please enter a number.
'+ '
The maximum length is too low. Please enter a number larger than the minimum length you set.
'+ '
'+ '
', @@ -148,13 +148,13 @@ export default control:'
'+ '
'+ ''+ - '
The minimum length you entered is not a number. Please enter a number.
'+ + '
The minimum length you entered is not a number. Please enter a number.
'+ '
The minimium length is too high. Please enter a lower number.
'+ '
The minimum length is too low. Please enter a positive number.
'+ '
'+ '
'+ ''+ - '
The maximum length you entered is not a number. Please enter a number.
'+ + '
The maximum length you entered is not a number. Please enter a number.
'+ '
The maximum length is too low. Please enter a number larger than the minimum length you set.
'+ '
'+ '
', diff --git a/awx/ui/static/lib/ansible/directives.js b/awx/ui/static/lib/ansible/directives.js index 1ac2599250..cf97f9d8e8 100644 --- a/awx/ui/static/lib/ansible/directives.js +++ b/awx/ui/static/lib/ansible/directives.js @@ -70,7 +70,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job require: 'ngModel', scope: { ngModel: '=ngModel' }, template: '
' + - '