fix #1155 where editing a note on the notes page submits the wrong form

This commit is contained in:
Reinier Balt 2011-04-29 18:26:27 +02:00
parent 3984ce0797
commit dbaf3b1c65
2 changed files with 6 additions and 5 deletions

View file

@ -1,8 +1,9 @@
<%
submit_text ||= t('common.update')
note = note_edit_form
form_for(note_edit_form, :html => {
:id => dom_id(note_edit_form, 'edit_form'),
form_for(note, :html => {
:id => dom_id(note, 'edit_form'),
:class => "inline-form edit-note-form"}) do |f|
-%>
@ -13,11 +14,11 @@ form_for(note_edit_form, :html => {
<div class="submit_box">
<div class="widgets">
<button type="submit" class="positive" id="<%= dom_id(note_edit_form, 'submit') %>" tabindex="15">
<button type="submit" class="positive" id="<%= dom_id(note, 'submit') %>" tabindex="15">
<%=image_tag("accept.png", :alt => "") %>
<%= submit_text %>
</button>
<a href="" class="negative" id="neg_<%=dom_id(note_edit_form, 'edit_form')%>">
<a href="" class="negative" id="neg_<%=dom_id(note, 'edit_form')%>">
<%=image_tag("cancel.png", :alt => "") %>
<%= t 'common.cancel' %>
</a>