Disable 'Save changes' button if input is empty, fixes #6351
This commit is contained in:
parent
d4f5af820f
commit
15c682fcb0
2 changed files with 5 additions and 3 deletions
|
@ -321,7 +321,9 @@ class Notes
|
|||
GitLab.GfmAutoComplete.setup()
|
||||
form = note.find(".note-edit-form")
|
||||
form.show()
|
||||
form.find("textarea").focus()
|
||||
textarea = form.find("textarea")
|
||||
textarea.focus()
|
||||
disableButtonIfEmptyField textarea, form.find(".js-comment-button")
|
||||
|
||||
###
|
||||
Called in response to clicking the edit note link
|
||||
|
|
|
@ -38,10 +38,10 @@
|
|||
= f.text_area :note, class: 'note_text js-note-text js-gfm-input turn-on'
|
||||
|
||||
.form-actions.clearfix
|
||||
= f.submit 'Save changes', class: "btn btn-primary btn-save"
|
||||
= f.submit 'Save changes', class: "btn btn-primary btn-save js-comment-button"
|
||||
|
||||
.note-form-option
|
||||
%a.choose-btn.btn.btn-small.js-choose-note-attachment-button
|
||||
%a.choose-btn.btn.js-choose-note-attachment-button
|
||||
%i.icon-paper-clip
|
||||
%span Choose File ...
|
||||
|
||||
|
|
Loading…
Reference in a new issue