summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2017-04-05 12:58:27 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2017-04-05 12:58:27 +1100
commit7d43484d2935d53fc81ad8bc0d9f7e57a69de692 (patch)
tree66de5836225b805846b346422b7853b6cb87d3f9 /app
parentd9aca741155f456711e37ea68a28a46d349af698 (diff)
downloadgitlab-ce-7d43484d2935d53fc81ad8bc0d9f7e57a69de692.tar.gz
Fix wiki commit message
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/wikis/_form.html.haml4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml
index c52527332bc..0d2cd4a7476 100644
--- a/app/views/projects/wikis/_form.html.haml
+++ b/app/views/projects/wikis/_form.html.haml
@@ -1,3 +1,5 @@
+- commit_message = @page.persisted? ? "Update #{@page.title}" : "Create #{@page.title}"
+
= form_for [@project.namespace.becomes(Namespace), @project, @page], method: @page.persisted? ? :put : :post, html: { class: 'form-horizontal wiki-form common-note-form prepend-top-default js-quick-submit' } do |f|
= form_errors(@page)
@@ -28,7 +30,7 @@
.form-group
= f.label :commit_message, class: 'control-label'
- .col-sm-10= f.text_field :message, class: 'form-control', rows: 18
+ .col-sm-10= f.text_field :message, class: 'form-control', rows: 18, value: commit_message
.form-actions
- if @page && @page.persisted?