summaryrefslogtreecommitdiff
path: root/app/views/notes/_form.html.haml
blob: 23c9553ebb17187ab8b035f9835dab94fd98983a (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
%div
  = form_for [@project, @note], :remote => "true", :multipart => true do |f|
    -if @note.errors.any?
      .errors.error
        - @note.errors.full_messages.each do |msg|
          %div= msg

    = f.hidden_field :noteable_id
    = f.hidden_field :noteable_type

    %div
      = f.label :note
      %cite.cgray markdown supported
      %br
      %br
      = f.text_area :note,  :size => 255

    %div.attach_holder
      %br
      = f.label :attachment
      %cite.cgray (less than 10 MB)
      %br
      %br
      = f.file_field :attachment

      = check_box_tag :notify, 1, @note.noteable_type != "Commit"
      = label_tag :notify, "Notify project team about your note"

      -if @note.noteable_type == "Commit"
        = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit"
        = label_tag :notify_author, "Notify commit author about your note"

    .clear
    %br
    = f.submit 'Add note', :class => "grey-button", :id => "submit_note"