Fixed edit_not in balancing.
This commit is contained in:
parent
da8fd1d72a
commit
c49edb79a2
7 changed files with 24 additions and 24 deletions
|
|
@ -1,9 +1,4 @@
|
|||
%h2 Notiz bearbeiten
|
||||
- remote_form_for 'order', @order, :url => {:action => 'update_note', :id => @order}, |
|
||||
:before => "Element.show('loader')", :success => "Element.hide('loader')" do |form| |
|
||||
= form.error_messages
|
||||
= form.text_area "note", :size => "60x20"
|
||||
%p
|
||||
= submit_tag "Speichern"
|
||||
|
|
||||
= link_to_function 'Abbrechen', "Element.hide('edit_box')"
|
||||
= simple_form_for @order, url: update_note_finance_order_path(@order), remote: true, method: :put do |f|
|
||||
= f.input :note, inner_html: {size: "60x20"}
|
||||
= f.submit
|
||||
1
app/views/finance/balancing/edit_note.js.erb
Normal file
1
app/views/finance/balancing/edit_note.js.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
$.fancybox('<%= escape_javascript(render("edit_note")) %>');
|
||||
|
|
@ -35,14 +35,12 @@
|
|||
= simple_format @order.note
|
||||
- else
|
||||
%p Hier kannst Du deine Abrechnung kommentieren
|
||||
= remote_link_to "Notiz bearbeiten", |
|
||||
:update => 'edit_box', :url => {:action => 'edit_note', :id => @order}, |
|
||||
:success => "Element.hide('loader'); Element.show('edit_box')" |
|
||||
= link_to "Notiz bearbeiten", edit_note_finance_order_path(@order), remote: true
|
||||
.box_title
|
||||
%h2 Kommentare
|
||||
.column_content
|
||||
#comments
|
||||
= render :partial => 'shared/comments'
|
||||
= render :partial => 'shared/comments', locals: {comments: @order.comments}
|
||||
|
||||
.left_column{:style => 'width: 69%'}
|
||||
.box_title
|
||||
|
|
@ -53,6 +51,6 @@
|
|||
%li= remote_link_to 'Bestellung bearbeiten', :update => 'results', :url => {:action => 'new', :id => @order, :view => 'editResults'}
|
||||
.column_content
|
||||
#results
|
||||
= render :partial => 'edit_results_by_articles'
|
||||
/= render :partial => 'edit_results_by_articles'
|
||||
%p= link_to_top
|
||||
#edit_box{:style => 'display:none'}
|
||||
2
app/views/finance/balancing/update_note.js.erb
Normal file
2
app/views/finance/balancing/update_note.js.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
$.fancybox.close();
|
||||
$('#note').html('<%= escape_javascript(simple_format(@order.note)) %>');
|
||||
Loading…
Add table
Add a link
Reference in a new issue