Remove dependency on Note instance from notes edit form.
This commit is contained in:
parent
1100320b0c
commit
41a2423030
2 changed files with 4 additions and 6 deletions
|
@ -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' }
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue