diff options
author | Ciro Santillli <ciro.santilli@gmail.com> | 2014-02-22 20:27:23 +0100 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-04-16 21:55:36 +0200 |
commit | 07a9d44de7a54b2cd1bffd9fcc830f7b2a03b549 (patch) | |
tree | c4ba6b94e3d4896f4c6955546d6cb90abe8efa82 /app/views | |
parent | 9b52affe31f2496fb10ae1d90b21f42ed173b7dc (diff) | |
download | gitlab-ce-07a9d44de7a54b2cd1bffd9fcc830f7b2a03b549.tar.gz |
Commit message textareas have 72 char mark line.
Diffstat (limited to 'app/views')
5 files changed, 13 insertions, 5 deletions
diff --git a/app/views/projects/blob/_remove.html.haml b/app/views/projects/blob/_remove.html.haml index 6384703671a..692248dd233 100644 --- a/app/views/projects/blob/_remove.html.haml +++ b/app/views/projects/blob/_remove.html.haml @@ -14,7 +14,8 @@ = label_tag 'commit_message', class: "control-label" do Commit message .col-sm-10 - = text_area_tag 'commit_message', params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3, class: 'form-control' + = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', + params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3, class: 'form-control')} .form-group .col-sm-2 .col-sm-10 diff --git a/app/views/projects/edit_tree/show.html.haml b/app/views/projects/edit_tree/show.html.haml index 3f2e98f3a7f..41a63493b2b 100644 --- a/app/views/projects/edit_tree/show.html.haml +++ b/app/views/projects/edit_tree/show.html.haml @@ -19,7 +19,8 @@ = label_tag 'commit_message', class: "control-label" do Commit message .col-sm-10 - = text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3, class: 'form-control' + = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', '', + placeholder: "Update #{@blob.name}", required: true, rows: 3, class: 'form-control')} .form-actions = hidden_field_tag 'last_commit', @last_commit = hidden_field_tag 'content', '', id: "file-content" diff --git a/app/views/projects/merge_requests/show/_mr_accept.html.haml b/app/views/projects/merge_requests/show/_mr_accept.html.haml index 6594709f2ae..43157481f34 100644 --- a/app/views/projects/merge_requests/show/_mr_accept.html.haml +++ b/app/views/projects/merge_requests/show/_mr_accept.html.haml @@ -21,7 +21,6 @@ = link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal" for instructions. - .js-toggle-container %p If you want to modify merge commit message - @@ -31,7 +30,8 @@ .form-group = label_tag :merge_commit_message, "Commit message", class: 'control-label' .col-sm-10 - = text_area_tag :merge_commit_message, @merge_request.merge_commit_message, class: "form-control js-gfm-input", rows: 14, required: true + = render 'shared/commit_message_container', {textarea: text_area_tag(:merge_commit_message, + @merge_request.merge_commit_message, class: "form-control js-gfm-input", rows: 14, required: true)} %p.hint The recommended maximum line length is 52 characters for the first line and 72 characters for all following lines. diff --git a/app/views/projects/new_tree/show.html.haml b/app/views/projects/new_tree/show.html.haml index 9d7c7afbeac..9ecbbe7508e 100644 --- a/app/views/projects/new_tree/show.html.haml +++ b/app/views/projects/new_tree/show.html.haml @@ -24,7 +24,8 @@ = label_tag 'commit_message', class: "control-label" do Commit message .col-sm-10 - = text_area_tag 'commit_message', params[:commit_message], placeholder: "Added new file", required: true, rows: 3, class: 'form-control' + = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', + params[:commit_message], placeholder: "Added new file", required: true, rows: 3, class: 'form-control')} .file-holder .file-title diff --git a/app/views/shared/_commit_message_container.html.haml b/app/views/shared/_commit_message_container.html.haml new file mode 100644 index 00000000000..cca7a0efc9b --- /dev/null +++ b/app/views/shared/_commit_message_container.html.haml @@ -0,0 +1,5 @@ +.commit-message-container + .max-width-marker + -# When the `ch` CSS length unit becomes widely supported `http://www.quirksmode.org/css/units-values` remove this workaround. + = 'a' * 72 + = textarea |