debian-mirror-gitlab/app/views/shared/_commit_message_container.html.haml

25 lines
1.1 KiB
Text
Raw Normal View History

2018-11-08 19:23:39 +05:30
.form-group.row.commit_message-group
2015-11-26 14:37:03 +05:30
- nonce = SecureRandom.hex
2017-08-17 22:00:37 +05:30
- descriptions = local_assigns.slice(:message_with_description, :message_without_description)
2018-11-08 19:23:39 +05:30
= label_tag "commit_message-#{nonce}", class: 'col-form-label col-sm-2' do
2017-09-10 17:25:29 +05:30
#{ _('Commit message') }
2015-04-26 12:48:37 +05:30
.col-sm-10
.commit-message-container
.max-width-marker
= text_area_tag 'commit_message',
2016-06-02 11:05:42 +05:30
(params[:commit_message] || local_assigns[:text] || local_assigns[:placeholder]),
class: 'form-control js-commit-message', placeholder: local_assigns[:placeholder],
2017-08-17 22:00:37 +05:30
data: descriptions,
2015-11-26 14:37:03 +05:30
required: true, rows: (local_assigns[:rows] || 3),
id: "commit_message-#{nonce}"
2015-04-26 12:48:37 +05:30
- if local_assigns[:hint]
%p.hint
2020-05-24 23:13:21 +05:30
= _('Try to keep the first line under 52 characters and the others under 72.')
2017-08-17 22:00:37 +05:30
- if descriptions.present?
.hint.js-with-description-hint
= link_to "#", class: "js-with-description-link" do
2020-05-24 23:13:21 +05:30
= _('Include description in commit message')
2017-08-17 22:00:37 +05:30
.hint.js-without-description-hint.hide
= link_to "#", class: "js-without-description-link" do
2020-05-24 23:13:21 +05:30
= _("Don't include description in commit message")