Fix weight notices on ActivityType (option values) pages
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 12 Sep 2023 01:45:35 +0000 (13:45 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 12 Sep 2023 01:45:35 +0000 (13:45 +1200)
CRM/Admin/Page/Options.php

index 93f30fc18fa0b416fc7968dc6067cda2ee988b62..19954130e2505d3bf46608eff249dd20f426cc8b 100644 (file)
@@ -157,26 +157,30 @@ class CRM_Admin_Page_Options extends CRM_Core_Page_Basic {
           'url' => 'civicrm/admin/options/' . self::$_gName,
           'qs' => 'action=update&id=%%id%%&reset=1',
           'title' => ts('Edit %1', [1 => self::$_gName]),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::UPDATE),
         ],
         CRM_Core_Action::DISABLE => [
           'name' => ts('Disable'),
           'ref' => 'crm-enable-disable',
           'title' => ts('Disable %1', [1 => self::$_gName]),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DISABLE),
         ],
         CRM_Core_Action::ENABLE => [
           'name' => ts('Enable'),
           'ref' => 'crm-enable-disable',
           'title' => ts('Enable %1', [1 => self::$_gName]),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::ENABLE),
         ],
         CRM_Core_Action::DELETE => [
           'name' => ts('Delete'),
           'url' => 'civicrm/admin/options/' . self::$_gName,
           'qs' => 'action=delete&id=%%id%%',
           'title' => ts('Delete %1 Type', [1 => self::$_gName]),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DELETE),
         ],
       ];
 
-      if (self::$_gName == 'custom_search') {
+      if (self::$_gName === 'custom_search') {
         $runLink = [
           CRM_Core_Action::FOLLOWUP => [
             'name' => ts('Run'),
@@ -184,6 +188,7 @@ class CRM_Admin_Page_Options extends CRM_Core_Page_Basic {
             'qs' => 'reset=1&csid=%%value%%',
             'title' => ts('Run %1', [1 => self::$_gName]),
             'class' => 'no-popup',
+            'weight' => 10,
           ],
         ];
         self::$_links = $runLink + self::$_links;