diff --git a/app/views/notes/_note_edit_form.rhtml b/app/views/notes/_note_edit_form.rhtml index 13a7026e..6cfe5681 100644 --- a/app/views/notes/_note_edit_form.rhtml +++ b/app/views/notes/_note_edit_form.rhtml @@ -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 => {
- - + <%=image_tag("cancel.png", :alt => "") %> <%= t 'common.cancel' %> diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 849da743..1e366e7d 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -898,7 +898,7 @@ var NotesPage = { /* update button when editing a note */ $("form.edit-note-form button.positive").live('click', function (ev) { - submit_with_ajax_and_block_element('form.edit-note-form', $(this)); + submit_with_ajax_and_block_element($(this).parents('form.edit-note-form'), $(this)); return false; }); }