_form.html.haml 951 Bytes
Newer Older
Vinnie Okada's avatar
Vinnie Okada committed
1
= form_for [@project.namespace.becomes(Namespace), @project, @note], remote: true, html: { :'data-type' => 'json', multipart: true, id: nil, class: "new_note js-new-note-form common-note-form gfm-form" }, authenticity_token: true do |f|
2
  = hidden_field_tag :view, diff_view
3
  = hidden_field_tag :line_type
4
  = note_target_fields(@note)
5
  = f.hidden_field :commit_id
6 7 8 9
  = f.hidden_field :line_code
  = f.hidden_field :noteable_id
  = f.hidden_field :noteable_type

10
  = render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do
11
    = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-quick-submit'
12
    = render 'projects/notes/hints'
13
    .error-alert
14

15
  .note-form-actions.clearfix
Andriy Dyadyura's avatar
Andriy Dyadyura committed
16
    = f.submit 'Add Comment', class: "btn btn-nr btn-create comment-btn btn-grouped js-comment-button"
17
    = yield(:note_actions)
Drew Blessing's avatar
Drew Blessing committed
18
    %a.btn.btn-nr.btn-cancel.js-close-discussion-note-form Cancel