From 7b9feb31c06477431e0396a24125cd7fd03308e7 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Mon, 21 Aug 2023 14:51:25 +0100 Subject: [PATCH] add manual processing option --- .../ang/afGuiEditor/afGuiEditor.component.js | 15 ++++++++++--- .../admin/ang/afGuiEditor/config-form.html | 21 ++++++++++++++++--- .../core/Civi/Api4/Action/Afform/Submit.php | 4 ++-- ext/afform/core/Civi/Api4/Afform.php | 10 ++++++++- 4 files changed, 41 insertions(+), 9 deletions(-) diff --git a/ext/afform/admin/ang/afGuiEditor/afGuiEditor.component.js b/ext/afform/admin/ang/afGuiEditor/afGuiEditor.component.js index f593defc15..6a80ebbd30 100644 --- a/ext/afform/admin/ang/afGuiEditor/afGuiEditor.component.js +++ b/ext/afform/admin/ang/afGuiEditor/afGuiEditor.component.js @@ -403,11 +403,20 @@ } }; + this.toggleManualProcessing = function() { + if (editor.afform.manual_processing) { + editor.afform.manual_processing = null; + } else { + editor.afform.create_submission = true; + } + } + this.toggleEmailVerification = function() { - if (editor.afform.require_email_confirmation) { - editor.afform.require_email_confirmation = null; + if (editor.afform.allow_verification_by_email) { + editor.afform.allow_verification_by_email = null; } else { editor.afform.create_submission = true; + editor.afform.manual_processing = true; } } @@ -624,7 +633,7 @@ // This might be set to undefined by validation afform.server_route = afform.server_route || ''; // create submission is required if email confirmation is selected. - if (afform.require_email_confirmation) { + if (afform.manual_processing || afform.allow_verification_by_email) { afform.create_submission = true; } $scope.saving = true; diff --git a/ext/afform/admin/ang/afGuiEditor/config-form.html b/ext/afform/admin/ang/afGuiEditor/config-form.html index 0d2701e0c5..126841257b 100644 --- a/ext/afform/admin/ang/afGuiEditor/config-form.html +++ b/ext/afform/admin/ang/afGuiEditor/config-form.html @@ -110,10 +110,17 @@ {{:: ts('Submissions') }} +<<<<<<< HEAD

+