BigW Consortium Gitlab

Commit 41a24230 by Adam Niedzielski Committed by Fatih Acet

Remove dependency on Note instance from notes edit form.

parent 1100320b
.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' }
......
......@@ -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'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment