You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB

<div class="page-header">
<h1>Edit <%= resource_name.to_s.humanize %></h1>
</div>
13 years ago
<%= simple_form_for(resource,
as: resource_name,
url: registration_path(resource_name),
html: { method: :put, class: 'form-horizontal' }
) do |f| %>
<%= devise_error_messages! %>
13 years ago
<div class="actions">
<%= f.input :first_name %>
<%= f.input :last_name %>
<%= f.input :email %>
<%= f.input :password, hint: "leave blank if you don't want to change it" %>
<%= f.input :password_confirmation %>
13 years ago
<%= f.input :current_password, hint: 'we need your current password to confirm your changes' %>
</div>
<div class="form-actions">
<%= f.submit "Update", class: 'btn btn-primary' %>
<%= link_to "Back", :back %>
</div>
<% end %>
13 years ago
<hr />
13 years ago
<div class="alert alert-error">
<h3>Danger zone</h3>
<%= link_to "Cancel account", registration_path(resource_name),
class: 'btn btn-danger pull-right',
confirm: "All your data will be deleted! Are you sure?",
method: :delete %>
<p>If you cancel your account all your data will be deleted!</p>
</div>