<% remote_form_for :work, :url => {:action => :update_row, :id => @work.id, :field => :description}, :html => {:id => "work_#{@work.id}_form"} do |f|%> <%=f.select :work_account_id, @work_accounts.map {|wa| [wa.name, wa.id]}, {}, :onchange => "new Ajax.Request('/works/update_row/#{@work.id}?field=description', {asynchronous:true, evalScripts:true, parameters:Form.serialize(form)})"%> <% end %> <%=render :partial => 'row_field', :locals => {:field => 'description'} %> <%=render :partial => 'row_field', :locals => {:field => 'started_at_time'} %> <%=render :partial => 'row_field', :locals => {:field => 'completed_at_time'} %> <% remote_form_for :work, :url => {:action => :update_row, :id => @work.id} do |f|%> <%=f.text_field :hours_time, :value => t(@work.hours), :class => 'task_hours'%> <% end %> <%=image_detour_to('delete.png', l(:delete), {:controller => 'works', :action => :destroy, :id => @work, :confirm => true}, nil, true)%> <% if @work.task %> <%=image_detour_to('task.png', "#{l :task}: #{@work.task.description}", {:controller => 'tasks', :action => :edit, :id => @work.task.id})%> <% end %>