diff --git a/app/views/devise/confirmations/expired.html.erb b/app/views/devise/confirmations/expired.html.erb
deleted file mode 100644
index 5a27eee4d..000000000
--- a/app/views/devise/confirmations/expired.html.erb
+++ /dev/null
@@ -1,11 +0,0 @@
-<% content_for :title, "Your invitation link has expired" %>
-
-
+
+
+ <%= content_for(:title) %>
+
+ <%= 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| %>
-
-
<%= f.govuk_error_summary %>
-
- <%= content_for(:title) %>
-
+
For security reasons, your join link expired - get another one using the button below (valid for 3 hours).
-
Enter your email address to get a new invitation link.
- <%= f.govuk_email_field :email,
- label: { text: "Email address" },
- autocomplete: "email",
- spellcheck: "false",
- value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
+ <%= f.hidden_field :email, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
+ <%= f.govuk_submit "Get a new join link" %>
+ <% end %>
- <%= f.govuk_submit "Send email" %>
-
-<% end %>
-
-<%= render "devise/shared/links" %>
+
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index cd1a30ee8..63389432d 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -152,7 +152,7 @@ Devise.setup do |config|
# their account can't be confirmed with the token any more.
# Default is nil, meaning there is no restriction on how long a user can take
# before confirming their account.
- config.confirm_within = 5.days
+ config.confirm_within = 3.hours
# If true, requires any email changes to be confirmed (exactly the same way as
# initial account confirmation) to be applied. Requires additional unconfirmed_email
diff --git a/db/schema.rb b/db/schema.rb
index 95e7799a1..d107bad1e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -504,11 +504,11 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_27_102334) do
t.integer "retirement_value_check"
t.integer "hodate_check"
t.integer "extrabor_value_check"
- t.integer "grant_value_check"
- t.integer "staircase_bought_value_check"
t.integer "deposit_and_mortgage_value_check"
t.integer "shared_ownership_deposit_value_check"
+ t.integer "grant_value_check"
t.integer "old_persons_shared_ownership_value_check"
+ t.integer "staircase_bought_value_check"
t.integer "monthly_charges_value_check"
t.index ["bulk_upload_id"], name: "index_sales_logs_on_bulk_upload_id"
t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id"