%h1 Sign up .row .col-xs-12.col-sm-6.col-lg-4 = form_for resource, as: resource_name, url: registration_path(resource_name) do |f| = devise_error_messages! %fieldset .form-group = f.text_field :username, placeholder: 'Username', class: 'form-control', required: true .help-block .form-group = f.text_field :first_name, placeholder: 'First Name', class: 'form-control', required: true .help-block .form-group = f.text_field :last_name, placeholder: 'Last Name', class: 'form-control', required: true .help-block .form-group = f.email_field :email, placeholder: 'E-mail', class: 'form-control' %fieldset - profile_builder = resource.user_profiles.empty? ? resource.user_profiles.build : resource.user_profiles = f.fields_for :user_profiles, profile_builder do |builder| = render 'user_profile_fields', f: builder %fieldset .form-group %label You may upload your photo to be used as an avatar = f.file_field :avatar .help-block #{User::MAX_AVATAR_SIZE_KB} Kb max %fieldset .form-group = f.password_field :password, placeholder: 'Password', class: 'form-control', required: true .help-block .form-group = f.password_field :password_confirmation, placeholder: 'Password Confirmation', class: 'form-control', required: true .help-block .form-group = f.submit 'Sign up', class: 'btn btn-primary' = render 'links'