File: _commit_message_container.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (25 lines) | stat: -rw-r--r-- 1,168 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.form-group.commit_message-group.gl-mt-5
  - nonce = SecureRandom.hex
  - descriptions = local_assigns.slice(:message_with_description, :message_without_description)
  = label_tag "commit_message-#{nonce}" do
    #{ _('Commit message') }
  .commit-message-container
    .max-width-marker
    = text_area_tag 'commit_message',
      (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-testid': 'commit-message-field',
      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")