diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-20 10:51:33 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-20 10:51:33 +0000 |
commit | c5976333c2ac7a0f089a46336e763068f60e968d (patch) | |
tree | cfea8763abb75e4db959775f84bba5c0607f2680 | |
parent | 1099d704b5132b86509efcc5840cde8fe20ad59f (diff) | |
download | redmine-c5976333c2ac7a0f089a46336e763068f60e968d.tar.gz redmine-c5976333c2ac7a0f089a46336e763068f60e968d.zip |
Adds a 'Create and continue' button on new user form.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3204 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/users_controller.rb | 4 | ||||
-rw-r--r-- | app/views/users/add.rhtml | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b800a3002..99b01c30f 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -82,7 +82,9 @@ class UsersController < ApplicationController if @user.save Mailer.deliver_account_information(@user, params[:password]) if params[:send_information] flash[:notice] = l(:notice_successful_create) - redirect_to :controller => 'users', :action => 'edit', :id => @user + redirect_to(params[:continue] ? {:controller => 'users', :action => 'add'} : + {:controller => 'users', :action => 'edit', :id => @user}) + return end end @auth_sources = AuthSource.find(:all) diff --git a/app/views/users/add.rhtml b/app/views/users/add.rhtml index 9f5320cf2..2e0743e87 100644 --- a/app/views/users/add.rhtml +++ b/app/views/users/add.rhtml @@ -3,5 +3,8 @@ <% labelled_tabular_form_for :user, @user, :url => { :action => "add" }, :html => { :class => nil } do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p> - <p><%= submit_tag l(:button_create) %></p> + <p> + <%= submit_tag l(:button_create) %> + <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> + </p> <% end %> |