<% if @block_bot %>
<%=_('Are you a robot?')%>
<%=_('Please, prove that you are human by filling the captcha.')%>
<% end %> <% @profile_data = @person %> <%= error_messages_for :user, :person, :header_message => _('The account could not be created') %> <% labelled_form_for :user, @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 %>/
<%= 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') %>
<%= observe_field 'user_login', :url => { :action => 'check_url' }, :with => 'identifier', :update => 'url-check', :loading => "jQuery('#user_login').removeClass('#{validation_classes}').addClass('checking'); jQuery('#url-check').html('

#{checking_message(:url)}

');", :complete => "jQuery('#user_login').removeClass('checking')" %>
<%= 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 %> <%= @plugins.dispatch(:signup_extra_contents).collect { |content| instance_eval(&content) }.join("") %> <%= template_options(:people, 'profile_data') %> <% unless @terms_of_use.blank? %>
<%= labelled_check_box(_('I accept the %s') % 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 %>
<%= recaptcha_tags :ajax => true, :display => {:theme => 'clean'} if @block_bot %>

<%= submit_button('save', _('Create my account')) %>

<% end -%>