ref: master
app/views/account/_signup_form.html.erb
<%= javascript_include_tag('sign_up_password_rate') %> <%= error_messages_for :user, :person, :header_message => _('The account could not be created') %> <%= labelled_form_for :user, :html => { :multipart => true, :id => 'signup-form', :honeypot => true } do |f| %> <%= hidden_field_tag :invitation_code, @invitation_code %><%= label(:user, :login, _('Username'), {:class => 'formlabel'}) %> <%= environment.default_hostname %>/<%= javascript_include_tag "signup_form" %><%= required text_field(:user, :login, :id => 'user_login', :onchange => 'this.value = convToValidUsername(this.value);') %><%= content_tag(:small, _('Choose your login name carefully! It will be your network access and you will not be able to change it later.'), :id => 'signup-balloon') %>
<%= required f.password_field(:password, :id => 'user_pw') %> <%= content_tag(:small,_('Choose a password that you can remember easily. It must have at least 4 characters.'), :id => 'password-balloon') %>
<%= required f.password_field(:password_confirmation) %> <%= content_tag(:small,_('We need to be sure that you filled in your password correctly. Confirm you password.'), :id => 'password-confirmation-balloon') %>
<%= required f.text_field(:email) %> <%= content_tag(:small,_('This e-mail address will be used to contact you.'), :id => 'email-balloon') %><%= observe_field "user_email", :url => { :action => "check_email" }, :with => "address", :update => "email-check", :loading => "jQuery('#user_email').removeClass('#{validation_classes}').addClass('checking'); jQuery('#email-check').html('
#{checking_message(:email)}
');", :complete => "jQuery('#user_email').removeClass('checking')", :before => "var field = jQuery('#user_email'); if (field.val()=='') { field.removeClass('#{validation_classes}'); jQuery('#email-check').html(''); return false; } if (!( field.valid() )) { field.removeClass('#{validation_classes}').addClass('invalid'); jQuery('#email-check').html('
#{_('This e-mail address is not valid')}
'); return false; }" %><%= labelled_form_field(_('Full name'), text_field(:profile_data, :name)) %> <%= content_tag(:small,_('Tell us your name, it will be used to identify yourself.'), :id => 'name-balloon') %><%= labelled_fields_for :profile_data, @person do |f| %> <%= render :partial => 'profile_editor/person_form', :locals => {:f => f} %> <% end %> <%= safe_join(@plugins.dispatch(:signup_extra_contents).collect { |content| instance_eval(&content) }, "") %> <%= render :partial => 'shared/custom_fields', :locals => {:f => f, :profile => @person, :signup => true} %> <%# FIXME: not for final users %> <%# template_options(:people, 'profile_data') %> <%= render :partial => 'shared/profile_kinds', :locals => {:form_field => 'profile_data'} %> <% unless @terms_of_use.blank? %><%= recaptcha_tags :ajax => true, :ssl => true, :display => {:theme => 'clean'} if @block_bot %><%= labelled_check_box(_('I accept the %s').html_safe % link_to(_('terms of use'), {:controller => 'home', :action => 'terms'}, :target => '_blank'), 'user[terms_accepted]') %><% 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 %><%= submit_button('save', _('Create my account')) %>
<% end -%>