_signup_form.rhtml
2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<%= error_messages_for :user, :person %>
<% if ! defined? hidden_atention || ! hidden_atention %>
<p/>
<div class="atention">
<%= _('Dear user, welcome to the %s network. To start your participation in this space, fill in the fields below. After this operation, your login and password will be registered, allowing you to create %s and %s in this environment.') % [environment.name, __('communities'), __('enterprises')] %>
</div>
<% end %>
<% labelled_form_for :user, @user do |f| %>
<%= icaptcha_field() %>
<%= hidden_field_tag :invitation_code, @invitation_code %>
<%= required_fields_message %>
<div id='signup-email'>
<%= required f.text_field(:email) %>
<%= content_tag(:small,_('This e-mail address will be used to contact you.')) %>
</div>
<%= required f.text_field(:login, :onchange => 'this.value = convToValidLogin( this.value )') %>
<%= content_tag(:small,_('Insert your login')) %>
<div id='url-check'></div>
<%= observe_field 'user_login', :url => {:action => 'check_url'}, :with => 'identifier', :update => 'url-check' %>
<div id='signup-password'>
<%= required f.password_field(:password) %>
<%= content_tag(:small,_('Choose a password that you can remember easily. It must have at least 4 characters.')) %>
</div>
<%= required f.password_field(:password_confirmation) %>
<%= content_tag(:small,_('To confirm, repeat your password.')) %>
<% labelled_fields_for :profile_data, @person do |f| %>
<%= render :partial => 'profile_editor/person_form', :locals => {:f => f} %>
<% end %>
<% unless @terms_of_use.blank? %>
<div id='terms-of-use-box' class='formfieldline'>
<%= _("By clicking on 'I accept the terms of use' below you are agreeing to the %s") %
link_to_function(_('Terms of use'), nil) do |page|
page['terms-of-use'].show
end %>
<div id='terms-of-use' style='display: none;'>
<%= @terms_of_use %>
<%= link_to_function(_('Hide'), nil) do |page|
page['terms-of-use'].hide
end %>
</div>
<p><%= labelled_check_box(environment.terms_of_use_acceptance_text.blank? ? _('I accept the terms of use') : environment.terms_of_use_acceptance_text, 'user[terms_accepted]') %></p>
</div>
<% end %>
<% if params[:enterprise_code] %>
<%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
<%= hidden_field_tag :answer, params[:answer] %>
<%= hidden_field_tag :terms_accepted, params[:terms_accepted] %>
<%= hidden_field_tag :new_user, true %>
<% end %>
<% button_bar do %>
<%= submit_button('save', _('Sign up'), :cancel => {:action => 'index'}, :class => 'icon-menu-login') %>
<% end %>
<% end -%>