Files
astuto/app/views/devise/registrations/edit.html.erb
Ruben Waterman 08de979b45 Add dark-mode support (#24)
* add dark-mode support

* make improvements as suggested by riggraz

* fix some dark theme styles

Co-authored-by: Riccardo Graziosi <riccardo.graziosi97@gmail.com>
2020-07-17 18:51:34 +02:00

62 lines
2.1 KiB
Plaintext

<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<h2>Profile settings</h2>
<%= render "devise/shared/error_messages", resource: resource %>
<div class="form-group">
<%= f.label :full_name %>
<%= f.text_field :full_name, autocomplete: "full-name", class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :email %>
<%= f.email_field :email, autocomplete: "email", class: "form-control" %>
<small id="emailGravatarHelp" class="form-text text-muted">
the email is <a href="https://gravatar.com" target="_blank">gravatar</a>ized
</small>
</div>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
<% end %>
<div class="form-group">
<%= f.label :password %>
<%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
<% if @minimum_password_length %>
<small id="passwordEditHelp" class="form-text text-muted">
leave blank if you don't want to change it
</small>
<small id="passwordHelp" class="form-text text-muted">
<%= @minimum_password_length %> characters minimum
</small>
<% end %>
</div>
<div class="form-group">
<%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :current_password %>
<%= f.password_field :current_password, autocomplete: "current-password", class: "form-control" %>
<small id="currentPasswordHelp" class="form-text text-muted">
we need your current password to confirm your changes
</small>
</div>
<div class="actions">
<%= f.submit "Update profile", class: "btn btn-block" %>
</div>
<% end %>
<br />
<div class="edit_user">
<h3>Cancel my account</h3>
<p>Unhappy?
<%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-danger btn-block" %>
</p>
</div>