summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2018-06-25 16:52:40 +0000
committerClement Ho <clemmakesapps@gmail.com>2018-06-25 16:52:40 +0000
commit3755d828fb1401d0bc272cc93a64a1c546e1fc3c (patch)
tree99d11df54d40584c4ca1223d4660a8f62c46f78a
parent6dd181da163a6479afa695b72f9c99a1e437a7a2 (diff)
parent5aff2bdb96e4131cc53f59a3cdd283a7a9fc2521 (diff)
downloadgitlab-ce-3755d828fb1401d0bc272cc93a64a1c546e1fc3c.tar.gz
Merge branch 'fix-inconsistent-cancel-button' into 'master'
Change button text to more specific "Discard draft" Closes #47475 See merge request gitlab-org/gitlab-ce!20140
-rw-r--r--app/assets/javascripts/notes/components/note_form.vue2
-rw-r--r--app/views/shared/notes/_form.html.haml2
-rw-r--r--spec/features/projects/commit/comments/user_adds_comment_spec.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/notes/components/note_form.vue b/app/assets/javascripts/notes/components/note_form.vue
index a62696b39b4..a4e3faa5d75 100644
--- a/app/assets/javascripts/notes/components/note_form.vue
+++ b/app/assets/javascripts/notes/components/note_form.vue
@@ -194,7 +194,7 @@ js-autosize markdown-area js-vue-issue-note-form js-vue-textarea"
class="btn btn-cancel note-edit-cancel js-close-discussion-note-form"
type="button"
@click="cancelHandler()">
- Cancel
+ {{ __('Discard draft') }}
</button>
</div>
</form>
diff --git a/app/views/shared/notes/_form.html.haml b/app/views/shared/notes/_form.html.haml
index c360f1ffe2a..6b2715b47a7 100644
--- a/app/views/shared/notes/_form.html.haml
+++ b/app/views/shared/notes/_form.html.haml
@@ -40,5 +40,5 @@
= yield(:note_actions)
- %a.btn.btn-cancel.js-note-discard{ role: "button", data: {cancel_text: "Cancel" } }
+ %a.btn.btn-cancel.js-note-discard{ role: "button", data: {cancel_text: "Discard draft" } }
Discard draft
diff --git a/spec/features/projects/commit/comments/user_adds_comment_spec.rb b/spec/features/projects/commit/comments/user_adds_comment_spec.rb
index 6397df086a7..53866c32c69 100644
--- a/spec/features/projects/commit/comments/user_adds_comment_spec.rb
+++ b/spec/features/projects/commit/comments/user_adds_comment_spec.rb
@@ -62,7 +62,7 @@ describe "User adds a comment on a commit", :js do
click_diff_line(sample_commit.line_code)
expect(page).to have_css(".js-temp-notes-holder form.new-note")
- .and have_css(".js-close-discussion-note-form", text: "Cancel")
+ .and have_css(".js-close-discussion-note-form", text: "Discard draft")
# The `Cancel` button closes the current form. The page should not have any open forms after that.
find(".js-close-discussion-note-form").click