gitlab-org--gitlab-foss/app/views/shared/_commit_message_container.html.haml
2018-04-24 16:40:46 -05:00

25 lines
1.1 KiB
Text

.form-group.row.commit_message-group
- nonce = SecureRandom.hex
- descriptions = local_assigns.slice(:message_with_description, :message_without_description)
= label_tag "commit_message-#{nonce}", class: 'col-form-label col-sm-2' do
#{ _('Commit message') }
.col-sm-10
.commit-message-container
.max-width-marker
= text_area_tag 'commit_message',
(params[:commit_message] || local_assigns[:text] || local_assigns[:placeholder]),
class: 'form-control js-commit-message', placeholder: local_assigns[:placeholder],
data: descriptions,
required: true, rows: (local_assigns[:rows] || 3),
id: "commit_message-#{nonce}"
- if local_assigns[:hint]
%p.hint
Try to keep the first line under 52 characters
and the others under 72.
- if descriptions.present?
.hint.js-with-description-hint
= link_to "#", class: "js-with-description-link" do
Include description in commit message
.hint.js-without-description-hint.hide
= link_to "#", class: "js-without-description-link" do
Don't include description in commit message