%= form_for([:admin, @user], html: { class: 'form-horizontal' }) do |f| %>
<%= devise_error_messages! %>
<%= render partial: '/devise/registrations/common_registration_fields', locals: { f: f } %>
<% end %>
<%= link_to icon_tag('glyphicon-chevron-left') + ' Back'.html_safe, admin_users_path, class: "btn btn-default" %>
<% if @user.persisted? %>
<%= link_to 'Become User', switch_to_user_admin_user_path(@user), class: "btn btn-default btn-info", data: { confirm: 'This will log you in as another user. Would you like to continue?' } %>
<% end %>