Fix notices on acl page
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 4 Jan 2022 22:41:26 +0000 (11:41 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 4 Jan 2022 22:43:23 +0000 (11:43 +1300)
civicrm/acl?reset=1

CRM/ACL/Page/ACL.php
templates/CRM/ACL/Header.tpl
templates/CRM/ACL/Page/ACL.tpl
templates/CRM/common/WizardHeader.tpl

index 7816abcfe0daf471f6b4c919383c4e0a25c94ebd..62ce735f4e9562d8305a87c37605b722549b03b6 100644 (file)
@@ -125,7 +125,7 @@ ORDER BY entity_id
     ] + CRM_Event_PseudoConstant::event();
 
     while ($dao->fetch()) {
-      $acl[$dao->id] = [];
+      $acl[$dao->id] = ['class' => ''];
       $acl[$dao->id]['name'] = $dao->name;
       $acl[$dao->id]['operation'] = $dao->operation;
       $acl[$dao->id]['entity_id'] = $dao->entity_id;
index d1d5e4e7f89156f8a53c4feb4f1e8dbb821726f4..fa94c0ae3a6cd51006286a520cb31fb14ef31c10 100644 (file)
 
 {php}
   $currentStep = $this->get_template_vars('step');
-  $wizard = array(
-    'style' => array(),
+  $wizard = [
+    'style' => ['barClass' => '', 'showTitle' => FALSE],
     'currentStepNumber' => $currentStep,
-    'steps' => array(
-      array(
+    'steps' => [
+      [
         'title' => ts('Manage Roles'),
         'link' => CRM_Utils_System::url('civicrm/admin/options/acl_role', 'reset=1'),
-      ),
-      array(
+        'collapsed' => FALSE,
+        'name' => '',
+      ],
+      [
         'title' => ts('Assign Users'),
         'link' => CRM_Utils_System::url('civicrm/acl/entityrole', 'reset=1'),
-      ),
-      array(
+        'collapsed' => FALSE,
+        'name' => '',
+      ],
+      [
         'title' => ts('Manage ACLs'),
         'link' => CRM_Utils_System::url('civicrm/acl', 'reset=1'),
-      ),
-    ),
-  );
+        'collapsed' => FALSE,
+        'name' => '',
+      ],
+    ],
+  ];
   foreach ($wizard['steps'] as $num => &$step) {
     $step['step'] = $step['valid'] = $step['stepNumber'] = $num + 1;
     if ($step['stepNumber'] == $currentStep) {
index 302c97a06cd0d4732ab713e440cb5a03e742849f..d1e07327ce0aaa6dfc435ca9f9e8ca02cdd3ee5b 100644 (file)
@@ -35,7 +35,7 @@
             </thead>
             <tbody>
             {foreach from=$rows item=row key=aclID}
-              <tr id="acl-{$aclID}" class="{cycle values="odd-row,even-row"}{if !empty($row.class)} {$row.class}{/if} crm-acl crm-entity {if NOT $row.is_active} disabled{/if}">
+              <tr id="acl-{$aclID}" class="{cycle values="odd-row,even-row"} {$row.class} crm-acl crm-entity {if NOT $row.is_active} disabled{/if}">
                 <td class="crm-acl-entity">{$row.entity}</td>
                 <td class="crm-acl-operation" >{$row.operation}</td>
                 <td class="crm-acl-object_name">{$row.object_name}</td>
index ddf44bae71ce3285e89d18955ca891308173ff9e..3834cea294f6cbb832e5b3a829a55e6ae51acb9a 100644 (file)
@@ -10,7 +10,7 @@
 {if count( $wizard.steps ) > 1}
 {* wizard.style variable is passed by some Wizards to allow alternate styling for progress "bar". *}
 <div id="wizard-steps">
-   <ul class="wizard-bar{if !empty($wizard.style.barClass)}-{$wizard.style.barClass}{/if}">
+   <ul class="wizard-bar{if $wizard.style.barClass}-{$wizard.style.barClass}{/if}">
     {section name=step loop=$wizard.steps}
         {if count ( $wizard.steps ) > 5 }
             {* truncate step titles so header isn't too wide *}
@@ -19,7 +19,7 @@
             {assign var="title" value=$wizard.steps[step].title}
         {/if}
         {* Show each wizard link unless collapsed value is true. Also excluding quest app submit steps. Should create separate WizardHeader for Quest at some point.*}
-        {if empty($wizard.steps[step].collapsed) && !empty($wizard.steps[step].name) && $wizard.steps[step].name NEQ 'Submit' && $wizard.steps[step].name NEQ 'PartnerSubmit'}
+        {if !$wizard.steps[step].collapsed && $wizard.steps[step].name && $wizard.steps[step].name NEQ 'Submit' && $wizard.steps[step].name NEQ 'PartnerSubmit'}
             {assign var=i value=$smarty.section.step.iteration}
             {if $wizard.currentStepNumber > $wizard.steps[step].stepNumber}
                 {if $wizard.steps[step].step}