%= error_messages_for :user, :person %>
<% if !@wizard %>
<% if ! defined? hidden_atention || ! hidden_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')] %>
<% end %>
<% end %>
<% labelled_form_for :user, @user,
:html => { :help=>_('Fill all these fields to join in this environment. If you forgot your password, do not create a new account, click on the "I forgot my password!" link. ;-)'), :id => 'profile-data'
} do |f| -%>
<%= icaptcha_field() %>
<%= hidden_field_tag :invitation_code, @invitation_code %>
<%= hidden_field_tag :wizard, @wizard %>
<%= required_fields_message %>
<%= required f.text_field(:email,
:help => help=_('This e-mail address will be used to contact you.')) %>
<%= help %>
<%= required f.text_field(:login,
:help => help=_('Insert your login'),
:onchange => 'this.value = convToValidLogin( this.value )') %>
<%= observe_field 'user_login', :url => {:action => 'check_url'}, :with => 'identifier', :update => 'url-check' %>
<%= required f.password_field(:password,
:help => help=_('Choose a password that you can remember easily. It must have at least 4 characters.')) %>
<%= help %>
<%= required f.password_field(:password_confirmation,
:help => help=_('To confirm, repeat your password.')) %>
<%= help %>
<% labelled_fields_for :profile_data, @person do |f| %>
<%= render :partial => 'profile_editor/person_form', :locals => {:f => f} %>
<% end %>
<% if @terms_of_use %>
<% 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 %>
<% if @wizard %>
<%= submit_button('save', _('Sign up'), :class => 'icon-menu-login') %>
<% else %>
<%= submit_button('save', _('Sign up'), :cancel => {:action => 'index'}, :class => 'icon-menu-login') %>
<% end %>
<% end %>
<% end -%>