Skip to content

Commit

Permalink
Fix notices on acl page
Browse files Browse the repository at this point in the history
civicrm/acl?reset=1
  • Loading branch information
eileenmcnaughton committed Jan 4, 2022
1 parent c5321bd commit 777ecce
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CRM/ACL/Page/ACL.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function browse() {
] + 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;
Expand Down
28 changes: 17 additions & 11 deletions templates/CRM/ACL/Header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,30 @@

{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) {
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/ACL/Page/ACL.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/common/WizardHeader.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 *}
Expand All @@ -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}
Expand Down

0 comments on commit 777ecce

Please sign in to comment.