adjust invitation

pull/402/head
Pete Matsyburka 3 weeks ago
parent dc178ef03f
commit fd2ba57325

@ -1,4 +1,11 @@
# frozen_string_literal: true # frozen_string_literal: true
class InvitationsController < Devise::PasswordsController class InvitationsController < Devise::PasswordsController
def update
super do |resource|
resource.confirmed_at ||= Time.current if resource.errors.empty?
PasswordsController::Current.user = resource
end
end
end end

@ -3,7 +3,7 @@
<%= svg_icon('waving_hand', class: 'h-10 w-10') %> <%= svg_icon('waving_hand', class: 'h-10 w-10') %>
<span><%= t('welcome_to_product_name', product_name: Docuseal.product_name) %></span> <span><%= t('welcome_to_product_name', product_name: Docuseal.product_name) %></span>
</h1> </h1>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: 'space-y-6' }) do |f| %> <%= form_for(resource, as: resource_name, url: invitation_path, html: { method: :put, class: 'space-y-6' }) do |f| %>
<div class="space-y-2"> <div class="space-y-2">
<%= render 'devise/shared/error_messages', resource: %> <%= render 'devise/shared/error_messages', resource: %>
<%= f.hidden_field :reset_password_token %> <%= f.hidden_field :reset_password_token %>

Loading…
Cancel
Save