summaryrefslogtreecommitdiff
path: root/app/views/notes/_form.html.haml
blob: f5571aede5e38c930fbcdbe9bcd17892f80924a2 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
= form_for [@project, @note], :remote => "true", :multipart => true do |f|
  %h3.page_title Leave a comment
  -if @note.errors.any?
    .alert-message.block-message.error
      - @note.errors.full_messages.each do |msg|
        %div= msg

  = f.hidden_field :noteable_id
  = f.hidden_field :noteable_type
  = f.text_area :note, :size => 255
  #preview-note.well.hide
  %p.hint
    = link_to "Gitlab Markdown", help_markdown_path, :target => '_blank'
    is enabled.
    = link_to 'Preview', preview_project_notes_path(@project), :id => 'preview-link'

  .row.note_advanced_opts.hide
    .span2
      = f.submit 'Add Comment', :class => "btn primary submit_note", :id => "submit_note"
    .span4.notify_opts
      %h6.left Notify via email:
      = 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
    .span6.attachments
      %h6.left Attachment:
      %span.file_name File name...
      
      .input.input_file
        %a.file_upload.btn.small Upload File
        = f.file_field :attachment, :class => "input-file"
      %span.hint Any file less than 10 MB