Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-12 00:10:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-12 00:10:21 +0300
commit0ae8428c8e77d5d7e098827be688b1f146321af1 (patch)
treecfc80aac796be0dd42ce32a1bd79c8327071993d /app/assets/javascripts/pipeline_new
parentf020d5dc9bf42fe27b1451af34e7ab3a0c38d344 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipeline_new')
-rw-r--r--app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue15
-rw-r--r--app/assets/javascripts/pipeline_new/constants.js3
2 files changed, 16 insertions, 2 deletions
diff --git a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
index 06ea9188113..5472e51445a 100644
--- a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
+++ b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue
@@ -21,7 +21,12 @@ import { backOff } from '~/lib/utils/common_utils';
import httpStatusCodes from '~/lib/utils/http_status';
import { redirectTo } from '~/lib/utils/url_utility';
import { s__, __, n__ } from '~/locale';
-import { VARIABLE_TYPE, FILE_TYPE, CONFIG_VARIABLES_TIMEOUT } from '../constants';
+import {
+ VARIABLE_TYPE,
+ FILE_TYPE,
+ CONFIG_VARIABLES_TIMEOUT,
+ CC_VALIDATION_REQUIRED_ERROR,
+} from '../constants';
import filterVariables from '../utils/filter_variables';
import RefsDropdown from './refs_dropdown.vue';
@@ -60,6 +65,8 @@ export default {
GlSprintf,
GlLoadingIcon,
RefsDropdown,
+ CcValidationRequiredAlert: () =>
+ import('ee_component/billings/components/cc_validation_required_alert.vue'),
},
directives: { SafeHtml },
props: {
@@ -143,6 +150,9 @@ export default {
descriptions() {
return this.form[this.refFullName]?.descriptions ?? {};
},
+ ccRequiredError() {
+ return this.error === CC_VALIDATION_REQUIRED_ERROR;
+ },
},
watch: {
refValue() {
@@ -329,8 +339,9 @@ export default {
<template>
<gl-form @submit.prevent="createPipeline">
+ <cc-validation-required-alert v-if="ccRequiredError" class="gl-pb-5" />
<gl-alert
- v-if="error"
+ v-else-if="error"
:title="errorTitle"
:dismissible="false"
variant="danger"
diff --git a/app/assets/javascripts/pipeline_new/constants.js b/app/assets/javascripts/pipeline_new/constants.js
index 681755dc6ab..91a064a0fb8 100644
--- a/app/assets/javascripts/pipeline_new/constants.js
+++ b/app/assets/javascripts/pipeline_new/constants.js
@@ -4,3 +4,6 @@ export const DEBOUNCE_REFS_SEARCH_MS = 250;
export const CONFIG_VARIABLES_TIMEOUT = 5000;
export const BRANCH_REF_TYPE = 'branch';
export const TAG_REF_TYPE = 'tag';
+
+export const CC_VALIDATION_REQUIRED_ERROR =
+ 'Credit card required to be on file in order to create a pipeline';