From 7e0122615e7d18e1077f3342df4a2095ae6371d9 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Mon, 6 Jun 2016 14:53:25 -0400 Subject: [PATCH] Added default values to the required job template survey questions This is really to fix #1445, the problem being that "" does not pass float validity, and the show/hide was triggering a check which included the hidden-but-still-there float fields. So this is an easy work around, and I think it's better UX as well since these values are required to be filled in in many cases. Fix survey maker add button after toggling password visibility --- .../survey-maker/surveys/init.factory.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/awx/ui/client/src/job-templates/survey-maker/surveys/init.factory.js b/awx/ui/client/src/job-templates/survey-maker/surveys/init.factory.js index dfd820637c..3cc415843f 100644 --- a/awx/ui/client/src/job-templates/survey-maker/surveys/init.factory.js +++ b/awx/ui/client/src/job-templates/survey-maker/surveys/init.factory.js @@ -204,16 +204,16 @@ export default scope.default_textarea = ""; scope.default_password = "" ; scope.choices = ""; - scope.text_min = ""; - scope.text_max = "" ; - scope.textarea_min = ""; - scope.textarea_max = "" ; - scope.password_min = "" ; - scope.password_max = "" ; - scope.int_min = ""; - scope.int_max = ""; - scope.float_min = ""; - scope.float_max = ""; + scope.text_min = 1; + scope.text_max = 1024 ; + scope.textarea_min = 1; + scope.textarea_max = 4096; + scope.password_min = 1; + scope.password_max = 32; + scope.int_min = 0; + scope.int_max = 100; + scope.float_min = 0.0; + scope.float_max = 100.0; } // Sets all of our scope variables used for adding/editing a question back to a clean state