BigW Consortium Gitlab

_commit_message_container.html.haml 1.11 KB
Newer Older
1
.form-group.commit_message-group
2
  - nonce = SecureRandom.hex
3
  - descriptions = local_assigns.slice(:message_with_description, :message_without_description)
4
  = label_tag "commit_message-#{nonce}", class: 'control-label' do
5 6 7 8 9
    Commit message
  .col-sm-10
    .commit-message-container
      .max-width-marker
      = text_area_tag 'commit_message',
10
          (params[:commit_message] || local_assigns[:text] || local_assigns[:placeholder]),
11
          class: 'form-control js-commit-message', placeholder: local_assigns[:placeholder],
12
          data: descriptions,
13 14
          required: true, rows: (local_assigns[:rows] || 3),
          id: "commit_message-#{nonce}"
15 16 17 18
    - if local_assigns[:hint]
      %p.hint
        Try to keep the first line under 52 characters
        and the others under 72.
19
    - if descriptions.present?
Nur Rony committed
20
      .hint.js-with-description-hint
21
        = link_to "#", class: "js-with-description-link" do
22
          Include description in commit message
Nur Rony committed
23
      .hint.js-without-description-hint.hide
24
        = link_to "#", class: "js-without-description-link" do
25
          Don't include description in commit message