##// END OF EJS Templates
Adds a 'Create and continue' button on new user form....
Jean-Philippe Lang -
r3090:c5976333c2ac
parent child
Show More
@@ -82,7 +82,9 class UsersController < ApplicationController
82 if @user.save
82 if @user.save
83 Mailer.deliver_account_information(@user, params[:password]) if params[:send_information]
83 Mailer.deliver_account_information(@user, params[:password]) if params[:send_information]
84 flash[:notice] = l(:notice_successful_create)
84 flash[:notice] = l(:notice_successful_create)
85 redirect_to :controller => 'users', :action => 'edit', :id => @user
85 redirect_to(params[:continue] ? {:controller => 'users', :action => 'add'} :
86 {:controller => 'users', :action => 'edit', :id => @user})
87 return
86 end
88 end
87 end
89 end
88 @auth_sources = AuthSource.find(:all)
90 @auth_sources = AuthSource.find(:all)
@@ -3,5 +3,8
3 <% labelled_tabular_form_for :user, @user, :url => { :action => "add" }, :html => { :class => nil } do |f| %>
3 <% labelled_tabular_form_for :user, @user, :url => { :action => "add" }, :html => { :class => nil } do |f| %>
4 <%= render :partial => 'form', :locals => { :f => f } %>
4 <%= render :partial => 'form', :locals => { :f => f } %>
5 <p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p>
5 <p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p>
6 <p><%= submit_tag l(:button_create) %></p>
6 <p>
7 <%= submit_tag l(:button_create) %>
8 <%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
9 </p>
7 <% end %>
10 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now