Files
forum/app/views/devise/registrations/edit.html.erb
Ricky Barrette b3b954df34 Started cleanup user forms
the cancel button on user cp is not working yet. before_filter not
called?
2013-01-22 11:38:35 -05:00

25 lines
1.0 KiB
Plaintext
Executable File

<h2>Edit <%= resource_name.to_s.humanize %></h2>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
<%= devise_error_messages! %>
<p><%= f.label :email %>
<%= f.email_field :email %></p>
<p><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br/>
<%= f.password_field :password %></p>
<p><%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation %></p>
<p><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
<%= f.password_field :current_password %></p>
<p>
<%= f.submit "Update", :class=> 'btn btn-primary'%> <%= button_tag "Cancel", :confirm => 'Are you sure? Any changes will be lost.', :class => 'btn', :type => 'submit', :name => 'commit', :value => 'cancel' %>
</p>
<% end %>
<h3>Unhappy?</h3>
<%= button_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete, :class =>'btn btn-danger' %>