71 lines
3.8 KiB
Plaintext
71 lines
3.8 KiB
Plaintext
<div class="min-h-screen flex items-center justify-center bg-neutral-50 py-12 px-4 sm:px-6 lg:px-8">
|
|
<div class="max-w-2xl w-full space-y-8">
|
|
<div>
|
|
<%= link_to "/" do %>
|
|
<img class="mx-auto h-12 w-auto" src="/icon.svg" alt="Aperonight" />
|
|
<% end %>
|
|
<h2 class="mt-6 text-center text-3xl font-extrabold text-neutral-900">
|
|
Modifier votre compte
|
|
</h2>
|
|
<p class="mt-2 text-center text-sm text-neutral-600">
|
|
Gérez vos informations et préférences
|
|
</p>
|
|
</div>
|
|
|
|
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: "mt-8 space-y-6" }) do |f| %>
|
|
<%= render "devise/shared/error_messages", resource: resource %>
|
|
|
|
<div class="space-y-6">
|
|
<div>
|
|
<%= f.label :email, class: "block text-sm font-medium text-neutral-700" %>
|
|
<%= f.email_field :email, autofocus: true, autocomplete: "email",
|
|
class: "mt-1 block w-full px-3 py-2 border border-neutral-300 rounded-md shadow-sm placeholder-neutral-400 focus:outline-none focus:ring-purple-500 focus:border-purple-500 sm:text-sm" %>
|
|
</div>
|
|
|
|
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
|
<div class="text-sm text-neutral-600">
|
|
En attente de confirmation pour : <%= resource.unconfirmed_email %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div>
|
|
<%= f.label :password, "Nouveau mot de passe", class: "block text-sm font-medium text-neutral-700" %>
|
|
<i class="text-sm text-neutral-500">(laissez vide si vous ne souhaitez pas le changer)</i>
|
|
<%= f.password_field :password, autocomplete: "new-password",
|
|
class: "mt-1 block w-full px-3 py-2 border border-neutral-300 rounded-md shadow-sm placeholder-neutral-400 focus:outline-none focus:ring-purple-500 focus:border-purple-500 sm:text-sm" %>
|
|
</div>
|
|
|
|
<div>
|
|
<%= f.label :password_confirmation, "Confirmer le nouveau mot de passe", class: "block text-sm font-medium text-neutral-700" %>
|
|
<%= f.password_field :password_confirmation, autocomplete: "new-password",
|
|
class: "mt-1 block w-full px-3 py-2 border border-neutral-300 rounded-md shadow-sm placeholder-neutral-400 focus:outline-none focus:ring-purple-500 focus:border-purple-500 sm:text-sm" %>
|
|
</div>
|
|
|
|
<div>
|
|
<%= f.label :current_password, "Mot de passe actuel", class: "block text-sm font-medium text-neutral-700" %>
|
|
<i class="text-sm text-neutral-500">(requis pour confirmer vos changements)</i>
|
|
<%= f.password_field :current_password, autocomplete: "current-password",
|
|
class: "mt-1 block w-full px-3 py-2 border border-neutral-300 rounded-md shadow-sm placeholder-neutral-400 focus:outline-none focus:ring-purple-500 focus:border-purple-500 sm:text-sm" %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex items-center justify-between">
|
|
<%= f.submit "Mettre à jour",
|
|
class: "group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-neutral-50 focus:ring-purple-500" %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<h3 class="text-center text-lg font-medium text-neutral-900">Supprimer mon compte</h3>
|
|
<div class="text-center">
|
|
<p class="text-sm text-neutral-600">
|
|
Mécontent ? <%= button_to "Supprimer mon compte", registration_path(resource_name),
|
|
data: { confirm: "Êtes-vous sûr ?", turbo_confirm: "Êtes-vous sûr ?" },
|
|
method: :delete,
|
|
class: "font-medium text-red-600 hover:text-red-500" %>
|
|
</p>
|
|
</div>
|
|
|
|
<%= link_to "Retour", :back, class: "text-center block text-purple-600 hover:text-purple-500" %>
|
|
</div>
|
|
</div>
|