9 changed files with 78 additions and 23 deletions
@ -0,0 +1,9 @@ |
|||||||
|
class Auth::ConfirmationsController < Devise::ConfirmationsController |
||||||
|
def create |
||||||
|
super |
||||||
|
end |
||||||
|
|
||||||
|
def show |
||||||
|
super |
||||||
|
end |
||||||
|
end |
@ -1,15 +1,32 @@ |
|||||||
<h2>Resend confirmation instructions</h2> |
<% content_for :title, "Resend invitation link" %> |
||||||
|
|
||||||
|
<% content_for :before_content do %> |
||||||
|
<%= govuk_back_link( |
||||||
|
text: "Back", |
||||||
|
href: :back, |
||||||
|
) %> |
||||||
|
<% end %> |
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> |
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> |
||||||
<%= render "devise/shared/error_messages", resource: resource %> |
<div class="govuk-grid-row"> |
||||||
|
<div class="govuk-grid-column-two-thirds"> |
||||||
|
<%= f.govuk_error_summary %> |
||||||
|
|
||||||
|
<h1 class="govuk-heading-l"> |
||||||
|
<%= content_for(:title) %> |
||||||
|
</h1> |
||||||
|
|
||||||
|
<p class="govuk-body">Enter your email address to get a new invitation link.</p> |
||||||
|
|
||||||
<%= f.govuk_email_field :email, |
<%= f.govuk_email_field :email, |
||||||
label: { text: "Email address" }, |
label: { text: "Email address" }, |
||||||
autocomplete: "email", |
autocomplete: "email", |
||||||
spellcheck: "false", |
spellcheck: "false", |
||||||
value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> |
value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> |
||||||
|
|
||||||
<%= f.govuk_submit "Resend confirmation instructions" %> |
<%= f.govuk_submit "Send email" %> |
||||||
|
</div> |
||||||
|
</div> |
||||||
<% end %> |
<% end %> |
||||||
|
|
||||||
<%= render "devise/shared/links" %> |
<%= render "devise/shared/links" %> |
||||||
|
@ -0,0 +1,11 @@ |
|||||||
|
class AddConfirmableUsers < ActiveRecord::Migration[7.0] |
||||||
|
def change |
||||||
|
change_table :users, bulk: true do |t| |
||||||
|
t.column :confirmation_token, :string |
||||||
|
t.column :confirmed_at, :datetime |
||||||
|
t.column :confirmation_sent_at, :datetime |
||||||
|
t.string :unconfirmed_email |
||||||
|
end |
||||||
|
add_index :users, :confirmation_token, unique: true |
||||||
|
end |
||||||
|
end |
Loading…
Reference in new issue