diff --git a/awx/ui/static/js/helpers/JobSubmission.js b/awx/ui/static/js/helpers/JobSubmission.js
index c5d00e2052..440db4f66d 100644
--- a/awx/ui/static/js/helpers/JobSubmission.js
+++ b/awx/ui/static/js/helpers/JobSubmission.js
@@ -116,6 +116,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
// url = params.url,
e;
+ html+='
job_launch_form.$valid = {{job_launch_form.$valid}}
';
$('#password-modal').empty().html(html);
$('#password-modal').find('textarea').before(scope.helpContainer);
e = angular.element(document.getElementById('password-modal'));
@@ -143,7 +144,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
id: 'password-modal',
scope: scope,
buttons: buttons,
- width: 600,
+ width: 620,
height: 700, //(scope.passwords.length > 1) ? 700 : 500,
minWidth: 500,
title: 'Launch Configuration',
@@ -158,7 +159,9 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
}
scope.removeDialogReady = scope.$on('DialogReady', function() {
$('#password-modal').dialog('open');
- $('#password-accept-button').attr({ "disabled": "disabled" });
+ $('#password-accept-button').attr('ng-disabled', 'job_launch_form.$invalid' );
+ e = angular.element(document.getElementById('password-accept-button'));
+ $compile(e)(scope);
});
};
@@ -174,22 +177,23 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
callback = params.callback || 'PasswordsAccepted',
form = CredentialForm,
acceptedPasswords = {},
- fld, field, html;
+ fld, field,
+ html=params.html || "";
scope.passwords = params.passwords;
// Wait('stop');
- html = "";
+
html += "