2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row.commit_message-group
|
2015-11-17 17:53:56 +00:00
|
|
|
- nonce = SecureRandom.hex
|
2016-11-28 21:10:59 +00:00
|
|
|
- descriptions = local_assigns.slice(:message_with_description, :message_without_description)
|
2018-04-12 23:16:56 +00:00
|
|
|
= label_tag "commit_message-#{nonce}", class: 'col-form-label col-sm-2' do
|
2017-06-09 13:08:39 +00:00
|
|
|
#{ _('Commit message') }
|
2014-09-26 22:41:17 +00:00
|
|
|
.col-sm-10
|
|
|
|
.commit-message-container
|
|
|
|
.max-width-marker
|
|
|
|
= text_area_tag 'commit_message',
|
2021-05-13 18:10:32 +00:00
|
|
|
(params[:commit_message] || local_assigns[:text] || local_assigns[:placeholder]),
|
|
|
|
class: 'form-control gl-form-input js-commit-message',
|
|
|
|
placeholder: local_assigns[:placeholder],
|
|
|
|
data: descriptions,
|
|
|
|
'data-qa-selector': 'commit_message_field',
|
|
|
|
required: true, rows: (local_assigns[:rows] || 3),
|
|
|
|
id: "commit_message-#{nonce}"
|
2014-09-26 22:41:17 +00:00
|
|
|
- if local_assigns[:hint]
|
|
|
|
%p.hint
|
2020-05-15 15:08:04 +00:00
|
|
|
= _('Try to keep the first line under 52 characters and the others under 72.')
|
2016-11-28 21:10:59 +00:00
|
|
|
- if descriptions.present?
|
2017-02-10 17:21:20 +00:00
|
|
|
.hint.js-with-description-hint
|
2016-12-05 11:43:40 +00:00
|
|
|
= link_to "#", class: "js-with-description-link" do
|
2020-05-15 15:08:04 +00:00
|
|
|
= _('Include description in commit message')
|
2018-04-24 21:40:46 +00:00
|
|
|
.hint.js-without-description-hint.hide
|
2016-12-05 11:43:40 +00:00
|
|
|
= link_to "#", class: "js-without-description-link" do
|
2020-05-15 15:08:04 +00:00
|
|
|
= _("Don't include description in commit message")
|