diff --git a/app/controllers/users/confirmations_controller.rb b/app/controllers/users/confirmations_controller.rb new file mode 100644 index 000000000..8aae938f1 --- /dev/null +++ b/app/controllers/users/confirmations_controller.rb @@ -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 diff --git a/app/views/users/confirmations/new.html.erb b/app/views/users/confirmations/new.html.erb deleted file mode 100644 index fbcac0308..000000000 --- a/app/views/users/confirmations/new.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -

Renvoyer les instructions de confirmation de compte

- -<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> - <%= devise_error_messages! %> - -
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true %> -
- -
- <%= f.submit "Renvoyer les instructions de confirmation" %> -
-<% end %> - -<%= render "users/shared/links" %> diff --git a/app/views/users/confirmations/new.html.haml b/app/views/users/confirmations/new.html.haml new file mode 100644 index 000000000..0f7e6534a --- /dev/null +++ b/app/views/users/confirmations/new.html.haml @@ -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' diff --git a/config/routes.rb b/config/routes.rb index 4f35ffe32..d61486811 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -73,6 +73,7 @@ Rails.application.routes.draw do devise_for :users, controllers: { sessions: 'users/sessions', registrations: 'users/registrations', + confirmations: 'users/confirmations', passwords: 'users/passwords' }