Merge pull request #23954 from eileenmcnaughton/poly
[civicrm-core.git] / CRM / Admin / Form / MessageTemplates.php
index dcf97bba3c6237332da58a26bf8750633f34d6cd..efabfc033a40188d326838fa50d4b864faeb34ac 100644 (file)
@@ -110,7 +110,7 @@ class CRM_Admin_Form_MessageTemplates extends CRM_Core_Form {
     else {
       $this->_workflow_id = $this->_values['workflow_id'] ?? NULL;
       $this->checkUserPermission($this->_workflow_id);
-      $this->assign('workflow_id', $this->_workflow_id);
+      $this->assign('isWorkflow', (bool) ($this->_values['workflow_id'] ?? NULL));
 
       if ($this->_workflow_id) {
         $selectedChild = 'workflow';
@@ -128,7 +128,7 @@ class CRM_Admin_Form_MessageTemplates extends CRM_Core_Form {
       ];
       if (!($this->_action & CRM_Core_Action::DELETE)) {
         $buttons[] = [
-          'type' => 'submit',
+          'type' => 'upload',
           'name' => ts('Save and Done'),
           'subName' => 'done',
         ];
@@ -244,7 +244,7 @@ class CRM_Admin_Form_MessageTemplates extends CRM_Core_Form {
    *   The input form values.
    * @param array $files
    *   The uploaded files if any.
-   * @param array $self
+   * @param self $self
    *
    * @return array
    *   array of errors