Add weights on profile fields page
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 15 Sep 2023 22:14:44 +0000 (10:14 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 15 Sep 2023 22:14:44 +0000 (10:14 +1200)
ie https://dmaster.localhost:32353/civicrm/admin/uf/group/field?reset=1&action=browse&gid=1

CRM/UF/Page/Field.php

index b939f01fc5d356c06ee193d8b7a91c1be20ff486..04ff5eb776c748c5104e8aa4f136e17a4ff22746 100644 (file)
@@ -54,28 +54,33 @@ class CRM_UF_Page_Field extends CRM_Core_Page {
           'url' => 'civicrm/admin/uf/group/field/update',
           'qs' => 'reset=1&action=update&id=%%id%%&gid=%%gid%%',
           'title' => ts('Edit CiviCRM Profile Field'),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::UPDATE),
         ],
         CRM_Core_Action::PREVIEW => [
           'name' => ts('Preview'),
           'url' => 'civicrm/admin/uf/group/preview',
           'qs' => 'action=preview&gid=%%gid%%&fieldId=%%id%%',
           'title' => ts('Preview CiviCRM Profile Field'),
+          'weight' => 0,
         ],
         CRM_Core_Action::DISABLE => [
           'name' => ts('Disable'),
           'ref' => 'crm-enable-disable',
           'title' => ts('Disable CiviCRM Profile Field'),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DISABLE),
         ],
         CRM_Core_Action::ENABLE => [
           'name' => ts('Enable'),
           'ref' => 'crm-enable-disable',
           'title' => ts('Enable CiviCRM Profile Field'),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::ENABLE),
         ],
         CRM_Core_Action::DELETE => [
           'name' => ts('Delete'),
           'url' => 'civicrm/admin/uf/group/field',
           'qs' => 'action=delete&id=%%id%%',
           'title' => ts('Enable CiviCRM Profile Field'),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DELETE),
         ],
       ];
     }