summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-07-21 15:55:50 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-07-21 15:55:50 +0000
commit82f5831545512f254b7e3ba01803163e8b6d755a (patch)
tree838d26cecade5733ce2eab07e96db0f53e54f1c0 /app
parentf595197ecfd57e7c3a61564d7409dfed88a50eff (diff)
downloadredmine-82f5831545512f254b7e3ba01803163e8b6d755a.tar.gz
redmine-82f5831545512f254b7e3ba01803163e8b6d755a.zip
Adds 'Create and continue' button on the new group form.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6304 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/groups_controller.rb6
-rw-r--r--app/views/groups/new.html.erb5
2 files changed, 8 insertions, 3 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index db56eff96..76b891a44 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -67,8 +67,10 @@ class GroupsController < ApplicationController
respond_to do |format|
if @group.save
- flash[:notice] = l(:notice_successful_create)
- format.html { redirect_to(groups_path) }
+ format.html {
+ flash[:notice] = l(:notice_successful_create)
+ redirect_to(params[:continue] ? new_group_path : groups_path)
+ }
format.xml { render :xml => @group, :status => :created, :location => @group }
else
format.html { render :action => "new" }
diff --git a/app/views/groups/new.html.erb b/app/views/groups/new.html.erb
index 469fc9b14..e983102af 100644
--- a/app/views/groups/new.html.erb
+++ b/app/views/groups/new.html.erb
@@ -2,5 +2,8 @@
<% form_for(@group, :builder => TabularFormBuilder, :lang => current_language) do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
-<p><%= f.submit l(:button_create) %></p>
+<p>
+ <%= f.submit l(:button_create) %>
+ <%= f.submit l(:button_create_and_continue), :name => 'continue' %>
+</p>
<% end %>