Skip to content

Commit

Permalink
rename moduleName variable in permissionModules loop
Browse files Browse the repository at this point in the history
  • Loading branch information
zeezo887 authored and ifox committed Oct 14, 2024
1 parent ed890eb commit 1ed1492
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions views/groups/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
<x-twill::formConnectedFields field-name="manage-modules"
:fieldValues="false"
>
@foreach($permissionModules as $moduleName => $moduleItems)
@foreach($permissionModules as $permissionModuleName => $moduleItems)
<x-twill::select
:name="'module_' . $moduleName . '_permissions'"
:label="ucfirst($moduleName) . ' permissions'"
:name="'module_' . $permissionModuleName . '_permissions'"
:label="ucfirst($permissionModuleName) . ' permissions'"
placeholder="Select a permission"
:options="[
[
Expand All @@ -39,11 +39,11 @@
],
[
'value' => 'view-module',
'label' => 'View ' . $moduleName
'label' => 'View ' . $permissionModuleName
],
[
'value' => 'edit-module',
'label' => 'Edit ' . $moduleName
'label' => 'Edit ' . $permissionModuleName
]
]"
/>
Expand All @@ -67,12 +67,12 @@
@if(\A17\Twill\Facades\TwillPermissions::levelIs(\A17\Twill\Enums\PermissionLevel::LEVEL_ROLE_GROUP_ITEM))
@can('edit-user-groups')
@section('fieldsets')
@foreach($permissionModules as $moduleName => $moduleItems)
<a17-fieldset title='{{ ucfirst($moduleName) . " Permissions"}}' id='{{ $moduleName }}'>
@foreach($permissionModules as $permissionModuleName => $moduleItems)
<a17-fieldset title='{{ ucfirst($permissionModuleName) . " Permissions"}}' id='{{ $permissionModuleName }}'>
<x-twill::select-permissions
:items-in-selects-tables="$moduleItems"
label-key="title"
:name-pattern="$moduleName . '_%id%_permission'"
:name-pattern="$permissionModuleName . '_%id%_permission'"
/>
</a17-fieldset>
@endforeach
Expand Down
6 changes: 3 additions & 3 deletions views/users/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ function($locale) {
:render-for-blocks="false"
:field-values="$item->role_id"
>
@foreach($permissionModules as $moduleName => $moduleItems)
<a17-fieldset title='{{ ucfirst($moduleName) . " Permissions"}}' id='{{ $moduleName }}'>
@foreach($permissionModules as $permissionModuleName => $moduleItems)
<a17-fieldset title='{{ ucfirst($permissionModuleName) . " Permissions"}}' id='{{ $permissionModuleName }}'>
<x-twill::select-permissions
:items-in-selects-tables="$moduleItems"
label-key="title"
:name-pattern="$moduleName . '_%id%_permission'"
:name-pattern="$permissionModuleName . '_%id%_permission'"
/>
</a17-fieldset>
@endforeach
Expand Down

0 comments on commit 1ed1492

Please sign in to comment.