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
|
.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|
|
= form_tag '#', method: :put, remote: true, class: 'edit-note common-note-form js-quick-submit' do
|
||||||
= note_target_fields(note)
|
|
||||||
= render layout: 'projects/md_preview', locals: { preview_class: 'md-preview' } 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'
|
= render 'projects/notes/hints'
|
||||||
|
|
||||||
.note-form-actions.clearfix
|
.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
|
%span.settings-message.note-edit-warning.js-edit-warning
|
||||||
Finish editing this message first!
|
Finish editing this message first!
|
||||||
%button.btn.btn-nr.btn-cancel.note-edit-cancel{ type: 'button' }
|
%button.btn.btn-nr.btn-cancel.note-edit-cancel{ type: 'button' }
|
||||||
|
|
|
@ -7,5 +7,4 @@
|
||||||
- else
|
- else
|
||||||
= render partial: "projects/notes/note", collection: @notes, as: :note
|
= render partial: "projects/notes/note", collection: @notes, as: :note
|
||||||
|
|
||||||
= render 'projects/notes/edit_form', note: @notes[0]
|
= render 'projects/notes/edit_form'
|
||||||
= hidden_field_tag :authenticity_token, form_authenticity_token
|
|
||||||
|
|
Loading…
Reference in a new issue