_discussion_note_form.html.haml 1 KB
Newer Older
Riyad Preukschas's avatar
Riyad Preukschas committed
1 2 3 4 5 6 7 8 9 10 11 12
= form_for [@project, @note], remote: true, html: { multipart: true, class: "new_note new_discussion_note js-discussion-note-form" } do |f|

  = note_target_fields
  = f.hidden_field :line_code
  = f.hidden_field :noteable_id
  = f.hidden_field :noteable_type

  -if @note.errors.any?
    .alert-message.block-message.error
      - @note.errors.full_messages.each do |msg|
        %div= msg

13
  = f.text_area :note,  size: 255, class: 'note_text js-note-text js-gfm-input'
Riyad Preukschas's avatar
Riyad Preukschas committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
  .note_actions
    .buttons
      = f.submit 'Add Comment', class: "btn comment-btn js-comment-button"
      %button.btn.js-close-discussion-note-form Cancel
    .options
      %h6.left Notify via email:
      .labels
        = label_tag :notify do
          = check_box_tag :notify, 1, @note.noteable_type != "Commit"
          %span Project team

        - if @note.notify_only_author?(current_user)
          = label_tag :notify_author do
            = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit"
            %span Commit author