From b4e790333fe397576faeb64286f848788e3f463f Mon Sep 17 00:00:00 2001
From: Cristian <cristian.aliaga@metadrop.net>
Date: Thu, 16 Nov 2023 14:23:04 +0100
Subject: [PATCH] Issue #3402112: Split STATE_DRAFT into STATE_DRAFT_CREATED
 and STATE_DRAFT_UPDATE

---
 src/Plugin/WebformHandler/WebformEntityHandler.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Plugin/WebformHandler/WebformEntityHandler.php b/src/Plugin/WebformHandler/WebformEntityHandler.php
index a2e51a7..f0b1986 100644
--- a/src/Plugin/WebformHandler/WebformEntityHandler.php
+++ b/src/Plugin/WebformHandler/WebformEntityHandler.php
@@ -90,7 +90,8 @@ class WebformEntityHandler extends WebformHandlerBase {
     $settings = $configuration['settings'];
 
     $states = [
-      WebformSubmissionInterface::STATE_DRAFT => $this->t('Draft Saved'),
+      WebformSubmissionInterface::STATE_DRAFT_CREATED => $this->t('Draft created'),
+      WebformSubmissionInterface::STATE_DRAFT_UPDATED => $this->t('Draft updated'),
       WebformSubmissionInterface::STATE_CONVERTED => $this->t('Converted'),
       WebformSubmissionInterface::STATE_COMPLETED => $this->t('Completed'),
       WebformSubmissionInterface::STATE_UPDATED => $this->t('Updated'),
@@ -195,7 +196,8 @@ class WebformEntityHandler extends WebformHandlerBase {
       '#type' => 'checkboxes',
       '#title' => $this->t('Execute'),
       '#options' => [
-        WebformSubmissionInterface::STATE_DRAFT => $this->t('…when <b>draft</b> is saved.'),
+        WebformSubmissionInterface::STATE_DRAFT_CREATED => $this->t('…when <b>draft</b> is created.'),
+        WebformSubmissionInterface::STATE_DRAFT_UPDATED => $this->t('…when <b>draft</b> is updated.'),
         WebformSubmissionInterface::STATE_CONVERTED => $this->t('…when anonymous submission is <b>converted</b> to authenticated.'),
         WebformSubmissionInterface::STATE_COMPLETED => $this->t('…when submission is <b>completed</b>.'),
         WebformSubmissionInterface::STATE_UPDATED => $this->t('…when submission is <b>updated</b>.'),
-- 
GitLab