diff --git a/awx/ui/client/src/controllers/Projects.js b/awx/ui/client/src/controllers/Projects.js index 9a1b188b47..589ff87d4a 100644 --- a/awx/ui/client/src/controllers/Projects.js +++ b/awx/ui/client/src/controllers/Projects.js @@ -647,6 +647,8 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log, url: GetBasePath('projects'), id: $scope.project_obj.id }); + + $scope.scmChange(); }); if ($scope.removeChoicesReady) { @@ -853,6 +855,34 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $scope.scmRequired = ($scope.scm_type.value !== 'manual') ? true : false; $scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? 'Revision #' : 'SCM Branch'; } + + // Dynamically update popover values + if($scope.scm_type.value) { + switch ($scope.scm_type.value) { + case 'git': + $scope.urlPopover = '
Example URLs for GIT SCM include:
Note: When using SSH protocol for GitHub or Bitbucket, enter an SSH key only, ' + + 'do not enter a username (other than git). Additionally, GitHub and Bitbucket do not support password authentication when using ' + + 'SSH. GIT read only protocol (git://) does not use username or password information.'; + break; + case 'svn': + $scope.urlPopover = '
Example URLs for Subversion SCM include:
' + + 'Example URLs for Mercurial SCM include:
' + + 'Note: Mercurial does not support password authentication for SSH. ' + + 'Do not put the username and key in the URL. ' + + 'If using Bitbucket and SSH, do not supply your Bitbucket username.'; + break; + default: + $scope.urlPopover = '
URL popover text'; + } + } }; $scope.SCMUpdate = function () {