diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-24 15:10:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-24 15:10:54 +0300 |
commit | 4d3bbc4990ead10831a087cece3ccdd25dc4f0b4 (patch) | |
tree | d6daa91eaae8318b7b26bc1b9bfbbb8f7a295da0 /app/assets/javascripts/boards | |
parent | 94df43c8c19e64afb29e8491b92c3d258f6814ea (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/boards')
-rw-r--r-- | app/assets/javascripts/boards/components/board_new_item.vue | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/assets/javascripts/boards/components/board_new_item.vue b/app/assets/javascripts/boards/components/board_new_item.vue index 44574de17d7..600917683cd 100644 --- a/app/assets/javascripts/boards/components/board_new_item.vue +++ b/app/assets/javascripts/boards/components/board_new_item.vue @@ -43,6 +43,12 @@ export default { // eslint-disable-next-line @gitlab/require-i18n-strings return `${this.list.id}-title`; }, + isIssueTitleEmpty() { + return this.title.trim() === ''; + }, + isCreatingIssueDisabled() { + return this.isIssueTitleEmpty || this.disableSubmit; + }, }, methods: { handleFormCancel() { @@ -54,7 +60,7 @@ export default { eventHub.$emit(`scroll-board-list-${this.list.id}`); this.$emit('form-submit', { - title, + title: title.trim(), list, }); }, @@ -69,7 +75,7 @@ export default { <label :for="inputFieldId" class="gl-font-weight-bold">{{ __('Title') }}</label> <gl-form-input :id="inputFieldId" - v-model.trim="title" + v-model="title" :autofocus="true" autocomplete="off" type="text" @@ -78,7 +84,8 @@ export default { <slot></slot> <div class="gl-clearfix gl-mt-4"> <gl-button - :disabled="!title || disableSubmit" + data-testid="create-button" + :disabled="isCreatingIssueDisabled" class="gl-float-left js-no-auto-disable" variant="confirm" type="submit" |