From 25a2e32082321638c6ed7cc4380e4d0f7d27c64e Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Tue, 3 Sep 2013 18:23:58 -0400 Subject: [PATCH] AC-318 fixed Forks tooltip and validation on Job Templates page --- awx/ui/static/js/forms/JobTemplates.js | 4 +--- awx/ui/static/js/forms/Jobs.js | 4 +--- awx/ui/static/lib/ansible/form-generator.js | 8 ++++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/awx/ui/static/js/forms/JobTemplates.js b/awx/ui/static/js/forms/JobTemplates.js index 44aa7ede40..d94c04a956 100644 --- a/awx/ui/static/js/forms/JobTemplates.js +++ b/awx/ui/static/js/forms/JobTemplates.js @@ -91,15 +91,13 @@ angular.module('JobTemplateFormDefinition', []) type: 'number', integer: true, min: 0, - max: null, spinner: true, "default": '0', addRequired: false, editRequired: false, 'class': "input-small", column: 1, - awPopOver: "

The number of parallel or simultaneous processes to use while executing the playbook. Provide a value between 0 and 100. " + - "A value of zero will use the ansible default setting of 5 parallel processes.

", + awPopOver: "

The number of parallel or simultaneous processes to use while executing the playbook.

", dataTitle: 'Forks', dataPlacement: 'right', dataContainer: "body" diff --git a/awx/ui/static/js/forms/Jobs.js b/awx/ui/static/js/forms/Jobs.js index 62fada96d2..23b4326781 100644 --- a/awx/ui/static/js/forms/Jobs.js +++ b/awx/ui/static/js/forms/Jobs.js @@ -91,7 +91,6 @@ angular.module('JobFormDefinition', []) type: 'number', integer: true, min: 0, - max: null, spinner: true, "class": 'input-small', "default": '0', @@ -99,8 +98,7 @@ angular.module('JobFormDefinition', []) editRequired: false, column: 1, disabled: true, - awPopOver: "

The number of parallel or simultaneous processes to use while executing the playbook. Provide a value between 0 and 100. " + - "A value of zero will use the ansible default setting of 5 parallel processes.

", + awPopOver: "

The number of parallel or simultaneous processes to use while executing the playbook.

", dataContainer: 'body', dataTitle: 'Forks', dataPlacement: 'right' diff --git a/awx/ui/static/lib/ansible/form-generator.js b/awx/ui/static/lib/ansible/form-generator.js index b9112780a6..08faec4ca0 100644 --- a/awx/ui/static/lib/ansible/form-generator.js +++ b/awx/ui/static/lib/ansible/form-generator.js @@ -92,7 +92,6 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies']) this.scope.formModalActionDisabled = false; if (form) { this.scope.formModalHeader = (options.mode == 'add') ? form.addTitle : form.editTitle; //Default title for default modal - console.log('header: ' + this.scope.formHeader); } this.scope.formModalInfo = false //Disable info button for default modal if (options.modal_selector) { @@ -545,10 +544,11 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies']) if (field.integer) { html += "
Must be an integer value
\n"; } - if (field.min || field.max) { + if (field.min !== undefined || field.max !== undefined) { html += "
Must be in range " + field.min + " to " + - field.max + "
\n"; + this.form.name + '_form.' + fld + ".$error.max\">Must be an integer between " + field.min + " and "; + html += (field.max !== undefined) ? field.max : 'unlimited'; + html += "\n"; } html += "
\n"; html += "\n";