diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-05 11:34:50 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-05 11:34:50 +0300 |
commit | 65ea732cfebd7efe5a0ae9b31eef4349c38cfa4b (patch) | |
tree | f751470303e3fb60331d8559afd1a747efff8a51 /app | |
parent | 20e6670a4779addff3244ee8713b6a6a8f969e4c (diff) | |
parent | 7d43484d2935d53fc81ad8bc0d9f7e57a69de692 (diff) |
Merge branch 'fix_wiki_commit_message' into 'master'
Fix wiki commit message
Closes #20389
See merge request !10464
Diffstat (limited to 'app')
-rw-r--r-- | app/views/projects/wikis/_form.html.haml | 4 |
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? |