Commit 9f3e8c3db4285e3357b7f0de4597580c06b547bd
1 parent
2f07775b
Exists in
master
and in
9 other branches
signup: Allow environment admin to add an introduction or help text to the sign up form
(ActionItem3156)
Showing
4 changed files
with
15 additions
and
0 deletions
Show diff stats
app/models/environment.rb
@@ -248,6 +248,9 @@ class Environment < ActiveRecord::Base | @@ -248,6 +248,9 @@ class Environment < ActiveRecord::Base | ||
248 | # store the Environment settings as YAML-serialized Hash. | 248 | # store the Environment settings as YAML-serialized Hash. |
249 | acts_as_having_settings :field => :settings | 249 | acts_as_having_settings :field => :settings |
250 | 250 | ||
251 | + # introduce and explain to users something about the signup | ||
252 | + settings_items :signup_intro, :type => String | ||
253 | + | ||
251 | # the environment's terms of use: every user must accept them before registering. | 254 | # the environment's terms of use: every user must accept them before registering. |
252 | settings_items :terms_of_use, :type => String | 255 | settings_items :terms_of_use, :type => String |
253 | 256 |
app/views/account/signup.html.erb
@@ -0,0 +1,5 @@ | @@ -0,0 +1,5 @@ | ||
1 | +<div class='description'> | ||
2 | + <%= _('This text will be shown to the user on the top of the sign up form.') %> | ||
3 | +</div> | ||
4 | + | ||
5 | +<%= labelled_form_field(_('Body'), text_area(:environment, :signup_intro, :cols => 40, :style => 'width: 100%', :class => 'mceEditor')) %> |
app/views/admin_panel/site_info.html.erb
@@ -17,6 +17,8 @@ | @@ -17,6 +17,8 @@ | ||
17 | :content => (render :partial => 'signup_welcome_text', :locals => {:f => f})} %> | 17 | :content => (render :partial => 'signup_welcome_text', :locals => {:f => f})} %> |
18 | <% tabs << {:title => _('Signup welcome page'), :id => 'signup-welcome-message', | 18 | <% tabs << {:title => _('Signup welcome page'), :id => 'signup-welcome-message', |
19 | :content => (render :partial => 'signup_welcome_screen', :locals => {:f => f}) }%> | 19 | :content => (render :partial => 'signup_welcome_screen', :locals => {:f => f}) }%> |
20 | + <% tabs << {:title => _('Signup introduction text'), :id => 'signup-intro', | ||
21 | + :content => (render :partial => 'signup_intro', :locals => {:f => f})} %> | ||
20 | <%= render_tabs(tabs) %> | 22 | <%= render_tabs(tabs) %> |
21 | <% button_bar do %> | 23 | <% button_bar do %> |
22 | <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %> | 24 | <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %> |