Merge pull request #22484 from civicrm/5.46
[civicrm-core.git] / CRM / Admin / Form / PdfFormats.php
index 1f7c10a0f50ceb8854df64679bb9fbd15c7174f2..975c495f4cbf84f33c10ab88ff3166af1070e1ea 100644 (file)
@@ -43,6 +43,11 @@ class CRM_Admin_Form_PdfFormats extends CRM_Admin_Form {
    */
   public $_id = NULL;
 
+  /**
+   * @var bool
+   */
+  public $submitOnce = TRUE;
+
   /**
    * Build the form object.
    */
@@ -120,11 +125,11 @@ class CRM_Admin_Form_PdfFormats extends CRM_Admin_Form {
     $bao = new CRM_Core_BAO_PdfFormat();
     $bao->savePdfFormat($values, $this->_id);
 
-    $status = ts('Your new PDF Page Format titled <strong>%1</strong> has been saved.', [1 => $values['name']], ts('Saved'), 'success');
+    $status = ts('Your new PDF Page Format titled <strong>%1</strong> has been saved.', [1 => $values['name']]);
     if ($this->_action & CRM_Core_Action::UPDATE) {
-      $status = ts('Your PDF Page Format titled <strong>%1</strong> has been updated.', [1 => $values['name']], ts('Saved'), 'success');
+      $status = ts('Your PDF Page Format titled <strong>%1</strong> has been updated.', [1 => $values['name']]);
     }
-    CRM_Core_Session::setStatus($status);
+    CRM_Core_Session::setStatus($status, ts('Saved'), 'success');
   }
 
 }