mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 06:42:32 -05:00
allow to resubmit form via shared link
This commit is contained in:
1 parent
11a90d797a
commit
99b33d4165
3 files changed
+14
-2
No files matched your search
@@ -13,8 +13,12 @@ class StartFormController < ApplicationController
|
||||
end
|
||||
|
||||
def update
|
||||
@submitter = Submitter.where(submission: @template.submissions.where(deleted_at: nil))
|
||||
.find_or_initialize_by(email: submitter_params[:email])
|
||||
@submitter = Submitter.new(email: submitter_params[:email])
|
||||
|
||||
if params[:resubmit].blank?
|
||||
@submitter = Submitter.where(submission: @template.submissions.where(deleted_at: nil))
|
||||
.find_by(email: submitter_params[:email]) || @submitter
|
||||
end
|
||||
|
||||
if @submitter.completed_at?
|
||||
redirect_to start_form_completed_path(@template.slug, email: submitter_params[:email])
|
||||
|
||||
Reference in new issue
Block a user