Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
2434d135
Commit
2434d135
authored
May 07, 2017
by
Sam Rose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep input data after creating existing tag
parent
9b03ed0a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
3 deletions
+10
-3
app/controllers/projects/tags_controller.rb
app/controllers/projects/tags_controller.rb
+2
-0
app/views/projects/_zen.html.haml
app/views/projects/_zen.html.haml
+2
-1
app/views/projects/tags/new.html.haml
app/views/projects/tags/new.html.haml
+2
-2
changelogs/unreleased/31625-tag-editor-loses-all-inputs-when-you-try-to-add-a-tag-that-already-exists.yml
...-inputs-when-you-try-to-add-a-tag-that-already-exists.yml
+4
-0
No files found.
app/controllers/projects/tags_controller.rb
View file @
2434d135
...
...
@@ -38,6 +38,8 @@ class Projects::TagsController < Projects::ApplicationController
redirect_to
namespace_project_tag_path
(
@project
.
namespace
,
@project
,
@tag
.
name
)
else
@error
=
result
[
:message
]
@message
=
params
[
:message
]
@release_description
=
params
[
:release_description
]
render
action:
'new'
end
end
...
...
app/views/projects/_zen.html.haml
View file @
2434d135
-
@gfm_form
=
true
-
current_text
||=
nil
-
supports_slash_commands
=
local_assigns
.
fetch
(
:supports_slash_commands
,
false
)
.zen-backdrop
-
classes
<<
' js-gfm-input js-autosize markdown-area'
-
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
,
current_text
,
class:
classes
,
placeholder:
placeholder
%a
.zen-control.zen-control-leave.js-zen-leave
{
href:
"#"
}
=
icon
(
'compress'
)
app/views/projects/tags/new.html.haml
View file @
2434d135
...
...
@@ -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
,
@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..."
,
current_text:
@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
...
...
changelogs/unreleased/31625-tag-editor-loses-all-inputs-when-you-try-to-add-a-tag-that-already-exists.yml
0 → 100644
View file @
2434d135
---
title
:
Keep input data after creating a tag that already exists
merge_request
:
11155
author
:
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