[Git][noosfero/noosfero][master] 2 commits: signup: Allow environment admin to add an introduction or help text to the sign up form

Bráulio Bhavamitra gitlab at gitlab.com
Mon Aug 10 01:36:11 BRT 2015


Bráulio Bhavamitra pushed to branch master at Noosfero / noosfero


Commits:
9f3e8c3d by Braulio Bhavamitra at 2015-08-09T20:33:03Z
signup: Allow environment admin to add an introduction or help text to the sign up form

(ActionItem3156)

- - - - -
945956c1 by Bráulio Bhavamitra at 2015-08-10T04:36:01Z
Merge branch 'signup-intro' into 'master'

Signup introduction text

See merge request !485

- - - - -


4 changed files:

- app/models/environment.rb
- app/views/account/signup.html.erb
- + app/views/admin_panel/_signup_intro.html.erb
- app/views/admin_panel/site_info.html.erb


Changes:

=====================================
app/models/environment.rb
=====================================
--- a/app/models/environment.rb
+++ b/app/models/environment.rb
@@ -248,6 +248,9 @@ class Environment < ActiveRecord::Base
   # store the Environment settings as YAML-serialized Hash.
   acts_as_having_settings :field => :settings
 
+  # introduce and explain to users something about the signup
+  settings_items :signup_intro, :type => String
+
   # the environment's terms of use: every user must accept them before registering.
   settings_items :terms_of_use, :type => String
 


=====================================
app/views/account/signup.html.erb
=====================================
--- a/app/views/account/signup.html.erb
+++ b/app/views/account/signup.html.erb
@@ -1,2 +1,7 @@
 <h1><%= _('Sign up for %s!') % environment.name %></h1>
+
+<div id='signup-intro'>
+  <%= environment.signup_intro %>
+</div>
+
 <%= render :partial => 'signup_form' %>


=====================================
app/views/admin_panel/_signup_intro.html.erb
=====================================
--- /dev/null
+++ b/app/views/admin_panel/_signup_intro.html.erb
@@ -0,0 +1,5 @@
+<div class='description'>
+  <%= _('This text will be shown to the user on the top of the sign up form.') %>
+</div>
+
+<%= labelled_form_field(_('Body'), text_area(:environment, :signup_intro, :cols => 40, :style => 'width: 100%', :class => 'mceEditor')) %>


=====================================
app/views/admin_panel/site_info.html.erb
=====================================
--- a/app/views/admin_panel/site_info.html.erb
+++ b/app/views/admin_panel/site_info.html.erb
@@ -17,6 +17,8 @@
     :content => (render :partial => 'signup_welcome_text', :locals => {:f => f})} %>
   <% tabs << {:title => _('Signup welcome page'), :id => 'signup-welcome-message',
     :content => (render :partial => 'signup_welcome_screen', :locals => {:f => f}) }%>
+  <% tabs << {:title => _('Signup introduction text'), :id => 'signup-intro',
+    :content => (render :partial => 'signup_intro', :locals => {:f => f})} %>
   <%= render_tabs(tabs) %>
   <% button_bar do %>
     <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %>



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/c2137b8ed77a540d0e0f4a7804f21c24d3b713e6...945956c1e3fe5e232e2b6ea6425be13b94155c7a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150810/2f4123be/attachment-0001.html>


More information about the Noosfero-dev mailing list