Sign up

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> <%= devise_error_messages! %>
<%= f.label :email %> <%= f.email_field :email %>
<%= f.label :password %> <%= f.password_field :password %>
<%= f.label :password_confirmation %> <%= f.password_field :password_confirmation %>
<% if params[:groups] %> <%= hidden_field_tag :groups, params[:groups] %> <% end %> <% if @attributes && @attributes.size>0 %>
<% @attributes.each do |attr| %>
<%= f.label attr.name %> <%= render :partial=>"form/form_field", :locals=>{:type=>attr.form_field_type, :field=>attr, :value=>params["#{attr.code_name}"], :is_mandatory=>attr.is_mandatory?, :has_error=>@errors && @errors[attr.id], :show_options_editor=>false} %> <% if attr.description.not_blank? %>
<%= attr.description %>
<% end %>
<% end %>
<% end %>
<%= f.submit "Sign up" %>
<% end %> <%= render "user/shared/links" %>