Merge pull request #18033 from eileenmcnaughton/cont_id
[civicrm-core.git] / CRM / Mailing / Form / Unsubscribe.php
index 9184967f57e4659b9759ce942e1274dbc8c9ef1c..95a675965955cdc94a9d15d1de94864963300984 100644 (file)
  */
 class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form {
 
+  /**
+   * Prevent people double-submitting the form (e.g. by double-clicking).
+   * https://lab.civicrm.org/dev/core/-/issues/1773
+   *
+   * @var bool
+   */
+  public $submitOnce = TRUE;
+
   public function preProcess() {
 
     $this->_type = 'unsubscribe';
@@ -121,7 +129,6 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form {
       CRM_Core_Session::setStatus($statusMsg, '', 'error');
 
     }
-
   }
 
 }