Skip to content

Commit

Permalink
commit message is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki-kimoto committed May 6, 2017
1 parent 69faa72 commit f8031a3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions templates/wiki.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@
$validation->add_failed(title => 'Page title can\'t start with _.');
}

# Commit message
if (!length $commit_message) {
$validation->add_failed('commit-message' => 'Edit message is empty.');
$commit_message = "Updated $title";
}

if ($validation->is_valid) {
Expand Down Expand Up @@ -222,7 +221,7 @@
</div>
<label>
<div class="wiki-edit-form-commit-message-description">
Edit message
Edit message(Optional)
</div>
<div class="wiki-edit-form-commit-message">
%= text_field 'commit-message';
Expand All @@ -249,7 +248,7 @@
</div>
<label>
<div class="wiki-edit-form-commit-message-description">
Edit message
Edit message(Optional)
</div>
<div class="wiki-edit-form-commit-message">
%= text_field 'commit-message';
Expand Down

0 comments on commit f8031a3

Please sign in to comment.