session: migrate the "token confirmation" page to the new design
This commit is contained in:
parent
e87264b402
commit
bfd106ba30
4 changed files with 50 additions and 16 deletions
32
app/controllers/users/confirmations_controller.rb
Normal file
32
app/controllers/users/confirmations_controller.rb
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class Users::ConfirmationsController < Devise::ConfirmationsController
|
||||||
|
layout "new_application"
|
||||||
|
|
||||||
|
# GET /resource/confirmation/new
|
||||||
|
# def new
|
||||||
|
# super
|
||||||
|
# end
|
||||||
|
|
||||||
|
# POST /resource/confirmation
|
||||||
|
# def create
|
||||||
|
# super
|
||||||
|
# end
|
||||||
|
|
||||||
|
# GET /resource/confirmation?confirmation_token=abcdef
|
||||||
|
# def show
|
||||||
|
# super
|
||||||
|
# end
|
||||||
|
|
||||||
|
# protected
|
||||||
|
|
||||||
|
# The path used after resending confirmation instructions.
|
||||||
|
# def after_resending_confirmation_instructions_path_for(resource_name)
|
||||||
|
# super(resource_name)
|
||||||
|
# end
|
||||||
|
|
||||||
|
# The path used after confirmation.
|
||||||
|
# def after_confirmation_path_for(resource_name, resource)
|
||||||
|
# super(resource_name, resource)
|
||||||
|
# end
|
||||||
|
end
|
|
@ -1,16 +0,0 @@
|
||||||
<h2>Renvoyer les instructions de confirmation de compte</h2>
|
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
|
||||||
<%= devise_error_messages! %>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :email %><br />
|
|
||||||
<%= f.email_field :email, autofocus: true %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<%= f.submit "Renvoyer les instructions de confirmation" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render "users/shared/links" %>
|
|
17
app/views/users/confirmations/new.html.haml
Normal file
17
app/views/users/confirmations/new.html.haml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
- content_for(:title, 'Renvoyer les instructions de confirmation de compte')
|
||||||
|
|
||||||
|
- content_for :footer do
|
||||||
|
= render partial: 'root/footer'
|
||||||
|
|
||||||
|
.container.devise-container
|
||||||
|
.one-column-centered
|
||||||
|
= devise_error_messages!
|
||||||
|
|
||||||
|
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { class: 'form' }) do |f|
|
||||||
|
|
||||||
|
%h1 Renvoyer les instructions de confirmation de compte
|
||||||
|
|
||||||
|
= f.label :email, 'Email'
|
||||||
|
= f.email_field :email, autofocus: true
|
||||||
|
|
||||||
|
= f.submit 'Renvoyer les instructions de confirmation', class: 'button primary'
|
|
@ -73,6 +73,7 @@ Rails.application.routes.draw do
|
||||||
devise_for :users, controllers: {
|
devise_for :users, controllers: {
|
||||||
sessions: 'users/sessions',
|
sessions: 'users/sessions',
|
||||||
registrations: 'users/registrations',
|
registrations: 'users/registrations',
|
||||||
|
confirmations: 'users/confirmations',
|
||||||
passwords: 'users/passwords'
|
passwords: 'users/passwords'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue