From 6292c8ddbd87d7047ee20e0c363741fa1229f61b Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Thu, 16 Oct 2014 09:48:46 -0400 Subject: [PATCH] fixed small error using float directive i hadn't used the smart-float directive correctly and in all the right places. i also adjusted the default_float in survey maker->edit question function --- awx/ui/static/js/forms/SurveyQuestion.js | 6 +++--- awx/ui/static/js/helpers/JobSubmission.js | 3 ++- awx/ui/static/js/helpers/Survey.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/awx/ui/static/js/forms/SurveyQuestion.js b/awx/ui/static/js/forms/SurveyQuestion.js index a39d1c98f9..eb436305dd 100644 --- a/awx/ui/static/js/forms/SurveyQuestion.js +++ b/awx/ui/static/js/forms/SurveyQuestion.js @@ -101,11 +101,11 @@ angular.module('SurveyQuestionFormDefinition', []) type: 'custom', control: '
'+ '
'+ - ''+ + ''+ '
This is not valid float!
'+ '
'+ '
'+ - ''+ + ''+ '
This is not valid float!
'+ '
'+ '
', @@ -150,7 +150,7 @@ angular.module('SurveyQuestionFormDefinition', []) type: 'custom', control: '
'+ ''+ - ''+ + ''+ '
This is not valid float!
'+ '
The value must be in range {{float_min}} to {{float_max}}!
'+ '
', diff --git a/awx/ui/static/js/helpers/JobSubmission.js b/awx/ui/static/js/helpers/JobSubmission.js index 992416e6ba..baccf6e300 100644 --- a/awx/ui/static/js/helpers/JobSubmission.js +++ b/awx/ui/static/js/helpers/JobSubmission.js @@ -118,7 +118,8 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi url = params.url, e; - html+='
job_launch_form.$valid = {{job_launch_form.$valid}}
'; + // html+='
job_launch_form.$valid = {{job_launch_form.$valid}}
'; + html+=''; $('#password-modal').empty().html(html); $('#password-modal').find('textarea').before(scope.helpContainer); e = angular.element(document.getElementById('password-modal')); diff --git a/awx/ui/static/js/helpers/Survey.js b/awx/ui/static/js/helpers/Survey.js index aadf3017f7..ff2bcbd5ae 100644 --- a/awx/ui/static/js/helpers/Survey.js +++ b/awx/ui/static/js/helpers/Survey.js @@ -423,7 +423,7 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', else if( question.type === 'float' ) { scope.float_min = question.min; scope.float_max = question.max; - scope.default_int = question.default; + scope.default_float = question.default; } else if ( question.type === 'multiselect'){