diff --git a/app/views/projects/notes/_edit_form.html.haml b/app/views/projects/notes/_edit_form.html.haml index 245a7c74ebff1d187fb5c6a19098f9b77fbbc45f..bf2f58a0cb17f2f2451557ed5157d3a5efc12593 100644 --- a/app/views/projects/notes/_edit_form.html.haml +++ b/app/views/projects/notes/_edit_form.html.haml @@ -1,12 +1,11 @@ .note-edit-form - = form_for note, url: namespace_project_note_path(@project.namespace, @project, note), method: :put, remote: true, authenticity_token: true, html: { class: 'edit-note common-note-form js-quick-submit' } do |f| - = note_target_fields(note) + = form_tag '#', method: :put, remote: true, class: 'edit-note common-note-form js-quick-submit' do = render layout: 'projects/md_preview', locals: { preview_class: 'md-preview' } do - = render 'projects/zen', f: f, attr: :note, classes: 'note-textarea js-note-text js-task-list-field', placeholder: "Write a comment or drag your files here..." + = render 'projects/zen', attr: 'note[note]', classes: 'note-textarea js-note-text js-task-list-field', placeholder: "Write a comment or drag your files here..." = render 'projects/notes/hints' .note-form-actions.clearfix - = f.submit 'Save Comment', class: 'btn btn-nr btn-save js-comment-button' + = submit_tag 'Save Comment', class: 'btn btn-nr btn-save js-comment-button' %span.settings-message.note-edit-warning.js-edit-warning Finish editing this message first! %button.btn.btn-nr.btn-cancel.note-edit-cancel{ type: 'button' } diff --git a/app/views/projects/notes/_notes.html.haml b/app/views/projects/notes/_notes.html.haml index 64d26d9ad502f9ddd0eef24a79cfd60b74ab4b17..a57c2d0fc4c1ba00af630854cc94bcca71dc7bff 100644 --- a/app/views/projects/notes/_notes.html.haml +++ b/app/views/projects/notes/_notes.html.haml @@ -7,5 +7,4 @@ - else = render partial: "projects/notes/note", collection: @notes, as: :note -= render 'projects/notes/edit_form', note: @notes[0] -= hidden_field_tag :authenticity_token, form_authenticity_token += render 'projects/notes/edit_form'