Show fields for archive when selected as scm_type

Signed-off-by: Philip Douglass <philip.douglass@amadeus.com>
This commit is contained in:
Philip Douglass 2019-07-30 16:34:49 -04:00
parent 8157ab2fa9
commit b011e34fae
2 changed files with 17 additions and 1 deletions

View File

@ -23,7 +23,7 @@ export default ['$scope', '$location', '$stateParams', 'GenerateForm',
$scope.canEditOrg = true;
const virtualEnvs = ConfigData.custom_virtualenvs || [];
$scope.custom_virtualenvs_options = virtualEnvs;
const [ProjectModel] = resolvedModels;
$scope.canAdd = ProjectModel.options('actions.POST');
@ -170,6 +170,14 @@ export default ['$scope', '$location', '$stateParams', 'GenerateForm',
$scope.lookupType = 'scm_credential';
$scope.scmBranchLabel = i18n._('SCM Branch/Tag/Revision');
break;
case 'archive':
$scope.credentialLabel = "SCM " + i18n._("Credential");
$scope.urlPopover = '<p>' + i18n._('Example URLs for Remote Archive SCM include:') + '</p>' +
'<ul class=\"no-bullets\"><li>https://github.com/username/project/archive/v0.0.1.tar.gz</li>' +
'<li>http://github.com/username/project/archive/v0.0.2.zip</li></ul>';
$scope.credRequired = false;
$scope.lookupType = 'scm_credential';
break;
case 'insights':
$scope.pathRequired = false;
$scope.scmRequired = false;

View File

@ -291,6 +291,14 @@ export default ['$scope', '$rootScope', '$stateParams', 'ProjectsForm', 'Rest',
$scope.lookupType = 'scm_credential';
$scope.scmBranchLabel = i18n._('SCM Branch/Tag/Revision');
break;
case 'archive':
$scope.credentialLabel = "SCM " + i18n._("Credential");
$scope.urlPopover = '<p>' + i18n._('Example URLs for Remote Archive SCM include:') + '</p>' +
'<ul class=\"no-bullets\"><li>https://github.com/username/project/archive/v0.0.1.tar.gz</li>' +
'<li>http://github.com/username/project/archive/v0.0.2.zip</li></ul>';
$scope.credRequired = false;
$scope.lookupType = 'scm_credential';
break;
case 'insights':
$scope.pathRequired = false;
$scope.scmRequired = false;