Switch from un-assigned formName to assigned entityInClassFormat
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 28 Jul 2023 03:00:36 +0000 (15:00 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 28 Jul 2023 03:05:59 +0000 (15:05 +1200)
CRM/Admin/Form/Generic.php
CRM/Admin/Form/Preferences.php
templates/CRM/Form/basicForm.tpl

index 1b27f2bcffb85b3c5306b8ffafc6c54efa1cfdb4..f7495599fb36e66154e223dbc18547a242cd962f 100644 (file)
@@ -55,8 +55,8 @@ class CRM_Admin_Form_Generic extends CRM_Core_Form {
    * @throws \CRM_Core_Exception
    */
   public function buildQuickForm() {
-    $this->addFieldsDefinedInSettingsMetadata();
     $this->assign('entityInClassFormat', 'setting');
+    $this->addFieldsDefinedInSettingsMetadata();
 
     // @todo - do we still like this redirect?
     CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url('civicrm/admin', 'reset=1'));
index 81af6d0903a06e0ebccad5d89e004b38ce891f4b..53d5af6ff65f39853d4bd28c4a2909e27ca36371 100644 (file)
@@ -83,6 +83,7 @@ class CRM_Admin_Form_Preferences extends CRM_Core_Form {
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
+    $this->assign('entityInClassFormat', 'setting');
 
     $this->addButtons([
       [
index 77923f064cebd7af1dd4bb4fd954b7038651c555..505e2bc498a1886630c17ffe090a67770a3d8758 100644 (file)
@@ -7,7 +7,7 @@
  | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
 *}
-<div class="crm-block crm-form-block crm-{$formName}-block">
+<div class="crm-block crm-form-block crm-{$entityInClassFormat}-block">
     {include file="CRM/Form/basicFormFields.tpl"}
     <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
 </div>