summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Rose <sam@gitlab.com>2017-05-07 22:20:37 -0400
committerSam Rose <sam@gitlab.com>2017-05-07 22:21:32 -0400
commit7b258903dff1d0ec496f2081e70b57a5287bd4b4 (patch)
tree96f23d5e6b4ea6ae377fcd062456264a76171aa2
parent8b9cd3c072768ca810d2b33009e35d93a05e417f (diff)
downloadgitlab-ce-31625-tag-editor-loses-all-inputs-when-you-try-to-add-a-tag-that-already-exists.tar.gz
-rw-r--r--app/views/projects/_zen.html.haml2
-rw-r--r--app/views/projects/tags/new.html.haml4
-rw-r--r--changelogs/unreleased/31625-tag-editor-loses-all-inputs-when-you-try-to-add-a-tag-that-already-exists.yml4
3 files changed, 7 insertions, 3 deletions
diff --git a/app/views/projects/_zen.html.haml b/app/views/projects/_zen.html.haml
index 0c8241053e7..2985cfde770 100644
--- a/app/views/projects/_zen.html.haml
+++ b/app/views/projects/_zen.html.haml
@@ -5,6 +5,6 @@
- if defined?(f) && f
= f.text_area attr, class: classes, placeholder: placeholder, data: { supports_slash_commands: supports_slash_commands }
- else
- = text_area_tag attr, nil, class: classes, placeholder: placeholder
+ = text_area_tag attr, text, class: classes, placeholder: placeholder
%a.zen-control.zen-control-leave.js-zen-leave{ href: "#" }
= icon('compress')
diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml
index 7c607d2956b..aca582e62dc 100644
--- a/app/views/projects/tags/new.html.haml
+++ b/app/views/projects/tags/new.html.haml
@@ -22,14 +22,14 @@
.form-group
= label_tag :message, nil, class: 'control-label'
.col-sm-10
- = text_area_tag :message, nil, required: false, tabindex: 3, class: 'form-control', rows: 5
+ = text_area_tag :message, params[:message], required: false, tabindex: 3, class: 'form-control', rows: 5
.help-block Optionally, add a message to the tag.
%hr
.form-group
= label_tag :release_description, 'Release notes', class: 'control-label'
.col-sm-10
= render layout: 'projects/md_preview', locals: { url: preview_markdown_path(@project), referenced_users: true } do
- = render 'projects/zen', attr: :release_description, classes: 'note-textarea', placeholder: "Write your release notes or drag files here..."
+ = render 'projects/zen', attr: :release_description, classes: 'note-textarea', placeholder: "Write your release notes or drag files here...", text: params[:release_description]
= render 'shared/notes/hints'
.help-block Optionally, add release notes to the tag. They will be stored in the GitLab database and displayed on the tags page.
.form-actions
diff --git a/changelogs/unreleased/31625-tag-editor-loses-all-inputs-when-you-try-to-add-a-tag-that-already-exists.yml b/changelogs/unreleased/31625-tag-editor-loses-all-inputs-when-you-try-to-add-a-tag-that-already-exists.yml
new file mode 100644
index 00000000000..aae760b0ef5
--- /dev/null
+++ b/changelogs/unreleased/31625-tag-editor-loses-all-inputs-when-you-try-to-add-a-tag-that-already-exists.yml
@@ -0,0 +1,4 @@
+---
+title: Keep input data after creating a tag that already exists
+merge_request: 11155
+author: