diff --git a/awx/ui/static/js/controllers/Projects.js b/awx/ui/static/js/controllers/Projects.js index e1d69c87a7..3540ac2c98 100644 --- a/awx/ui/static/js/controllers/Projects.js +++ b/awx/ui/static/js/controllers/Projects.js @@ -200,7 +200,6 @@ function ProjectsEdit ($scope, $rootScope, $compile, $location, $log, $routePara scope[fld + '_ask'] = false; $("#" + fld + "-clear-btn").removeAttr("disabled"); } - } } @@ -240,9 +239,18 @@ function ProjectsEdit ($scope, $rootScope, $compile, $location, $log, $routePara relatedSets[set] = { url: related[set], iterator: form.related[set].iterator }; } } - - setAskCheckboxes(); + if (data.scm_type !== "") { + for (var i=0; i < scope.scm_type_options.length; i++) { + if (scope.scm_type_options[i].value == data.scm_type) { + scope.scm_type = scope.scm_type_options[i]; + break; + } + } + } + master['scm_type'] = scope['scm_type']; + setAskCheckboxes(); + // Initialize related search functions. Doing it here to make sure relatedSets object is populated. RelatedSearchInit({ scope: scope, form: form, relatedSets: relatedSets }); RelatedPaginateInit({ scope: scope, relatedSets: relatedSets }); diff --git a/awx/ui/static/js/forms/Credentials.js b/awx/ui/static/js/forms/Credentials.js index 1983699cf5..fcd8899feb 100644 --- a/awx/ui/static/js/forms/Credentials.js +++ b/awx/ui/static/js/forms/Credentials.js @@ -60,8 +60,9 @@ angular.module('CredentialFormDefinition', []) type: 'textarea', addRequired: false, editRequired: false, + 'class': 'ssh-key-field', rows: 10, - "class": 'span10' + xtraWide: true }, "ssh_key_unlock": { label: 'Key Password', diff --git a/awx/ui/static/js/forms/Projects.js b/awx/ui/static/js/forms/Projects.js index 6d862d1030..948ec4b32f 100644 --- a/awx/ui/static/js/forms/Projects.js +++ b/awx/ui/static/js/forms/Projects.js @@ -128,8 +128,10 @@ angular.module('ProjectFormDefinition', []) label: 'SCM Private Key', type: 'textarea', ngShow: "scm_type !== '' && scm_type !== null", + xtraWide: true, addRequired: false, editRequired: false, + 'class': 'ssh-key-field', rows: 10 }, "scm_key_unlock": { diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index 5901e57b57..5a212610f2 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -105,6 +105,9 @@ hr { border-color: #ccc; } +.ssh-key-field { + font-family: Fixed, monospace; +} /* Use code-breakable in pop-over text to indent and wrap code segments */