@@ -172,7 +172,7 class TimelogController < ApplicationController | |||
|
172 | 172 | @time_entry.attributes = params[:time_entry] |
|
173 | 173 | if request.post? and @time_entry.save |
|
174 | 174 | flash[:notice] = l(:notice_successful_update) |
|
175 | redirect_to :action => 'details', :project_id => @time_entry.project | |
|
175 | redirect_to(params[:back_url] || {:action => 'details', :project_id => @time_entry.project}) | |
|
176 | 176 | return |
|
177 | 177 | end |
|
178 | 178 | @activities = Enumeration::get_values('ACTI') |
@@ -427,6 +427,10 module ApplicationHelper | |||
|
427 | 427 | form_for(name, object, options.merge({ :builder => TabularFormBuilder, :lang => current_language}), &proc) |
|
428 | 428 | end |
|
429 | 429 | |
|
430 | def back_url_hidden_field_tag | |
|
431 | hidden_field_tag 'back_url', (params[:back_url] || request.env['HTTP_REFERER']) | |
|
432 | end | |
|
433 | ||
|
430 | 434 | def check_all_links(form_name) |
|
431 | 435 | link_to_function(l(:button_check_all), "checkAll('#{form_name}', true)") + |
|
432 | 436 | " | " + |
@@ -2,6 +2,7 | |||
|
2 | 2 | |
|
3 | 3 | <% labelled_tabular_form_for :time_entry, @time_entry, :url => {:action => 'edit', :project_id => @time_entry.project} do |f| %> |
|
4 | 4 | <%= error_messages_for 'time_entry' %> |
|
5 | <%= back_url_hidden_field_tag %> | |
|
5 | 6 | |
|
6 | 7 | <div class="box"> |
|
7 | 8 | <p><%= f.text_field :issue_id, :size => 6 %> <em><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></em></p> |
General Comments 0
You need to be logged in to leave comments.
Login now