Files
astuto/app/views/devise/registrations/edit.html.erb
Riccardo Graziosi d7e7db9f72 Add custom CSS (#264)
2024-01-23 18:50:42 +01:00

66 lines
2.4 KiB
Plaintext

<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<h2><%= t('common.forms.auth.profile_settings') %></h2>
<%= render "devise/shared/error_messages", resource: resource %>
<div class="form-group">
<%= f.label :full_name, t('common.forms.auth.full_name') %>
<%= f.text_field :full_name, autocomplete: "full-name", class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :email, t('common.forms.auth.email') %>
<%= f.email_field :email, autocomplete: "email", class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :notifications_enabled, t('common.forms.auth.notifications_enabled') %>
&nbsp;
<%= f.check_box :notifications_enabled, style: "transform: scale(1.5)" %>
<small id="notificationsHelp" class="form-text text-muted">
<%= t('common.forms.auth.notifications_enabled_help') %>
</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, t('common.forms.auth.password') %>
<%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
<small id="passwordEditHelp" class="form-text text-muted">
leave blank if you don't want to change your password
</small>
</div>
<div class="form-group">
<%= f.label :password_confirmation, t('common.forms.auth.password_confirmation') %>
<%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :current_password, t('common.forms.auth.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 t('common.forms.auth.update_profile'), class: "btnPrimary btn-block" %>
</div>
<% end %>
<br />
<div class="edit_user">
<h3><%= t('common.forms.auth.cancel_account') %></h3>
<%= button_to t('common.forms.auth.cancel_account'),
registration_path(resource_name),
onclick: "return confirm('#{t('common.confirmation')}')",
method: :delete,
class: "btn btn-danger btn-block" %>
</div>