BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
23b83d5f
Commit
23b83d5f
authored
Aug 02, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Disable main submit button while submiting
parent
923a0623
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+10
-2
No files found.
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
23b83d5f
...
...
@@ -22,6 +22,7 @@
endpoint
:
getIssueData
.
create_note_path
,
author
:
getUserData
,
canUpdateIssue
:
getIssueData
.
current_user
.
can_update
,
isSubmitting
:
false
,
};
},
components
:
{
...
...
@@ -59,6 +60,9 @@
'js-note-target-reopen'
:
!
this
.
isIssueOpen
,
};
},
canSubmit
()
{
return
!
this
.
note
.
length
||
this
.
isSubmitting
;
}
},
methods
:
{
...
mapActions
([
...
...
@@ -83,8 +87,11 @@
noteData
.
data
.
note
.
type
=
constants
.
DISCUSSION_NOTE
;
}
this
.
isSubmitting
=
true
;
this
.
saveNote
(
noteData
)
.
then
((
res
)
=>
{
this
.
isSubmitting
=
false
;
if
(
res
.
errors
)
{
if
(
res
.
errors
.
commands_only
)
{
this
.
discard
();
...
...
@@ -96,6 +103,7 @@
}
})
.
catch
(()
=>
{
this
.
isSubmitting
=
false
;
this
.
discard
(
false
);
});
}
...
...
@@ -196,13 +204,13 @@
<div
class=
"pull-left btn-group append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
>
<button
@
click=
"handleSave()"
:disabled=
"
!note.length
"
:disabled=
"
canSubmit
"
class=
"btn btn-nr btn-create comment-btn js-comment-button js-comment-submit-button"
type=
"button"
>
{{
commentButtonTitle
}}
</button>
<button
:disabled=
"
!note.length
"
:disabled=
"
canSubmit
"
name=
"button"
type=
"button"
class=
"btn btn-nr comment-btn note-type-toggle js-note-new-discussion dropdown-toggle"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment