From 7e1dbf3a0ff3b84d1c5d84aee94f11e05434a126 Mon Sep 17 00:00:00 2001 From: lsces Date: Sun, 19 Apr 2026 19:09:10 +0100 Subject: Bringing Role admin pages into working order as need for latest website clinet. --- templates/admin_assign_role_user.tpl | 11 ++++++----- templates/admin_login.tpl | 18 +++++++++--------- templates/admin_role_edit.tpl | 35 ++++++++++++++++++----------------- templates/admin_users.tpl | 2 +- 4 files changed, 34 insertions(+), 32 deletions(-) mode change 100644 => 100755 templates/admin_role_edit.tpl mode change 100644 => 100755 templates/admin_users.tpl diff --git a/templates/admin_assign_role_user.tpl b/templates/admin_assign_role_user.tpl index 016c8c5..82e501b 100755 --- a/templates/admin_assign_role_user.tpl +++ b/templates/admin_assign_role_user.tpl @@ -12,6 +12,7 @@
{form legend="User Information" action="`$smarty.const.USERS_PKG_URL`admin/assign_role_user.php"} +
{formlabel label="Username"} @@ -35,7 +36,6 @@
{if $gBitSystem->isPackageActive('quota')} - {include_php file="`$smarty.const.QUOTA_PKG_INCLUDE_PATH`quota_inc.php"}
{formlabel label="Quota"} {forminput} @@ -73,7 +73,7 @@
- +
{/form} @@ -87,21 +87,22 @@ {cycle values="even,odd" print=false} {foreach from=$roles key=roleId item=role} - {if !$assignUser->mRoles.$roleId && $roleId != -1} + {if empty($assignUser->mRoles.$roleId) && $roleId != -1} {$role.role_name} {$role.role_desc} - + {booticon iname="fa-key" iexplain="assign"} {/if} {/foreach} + - {pagination assign_user=$assign_user} + {* pagination assign_user=$assign_user *}
diff --git a/templates/admin_login.tpl b/templates/admin_login.tpl index 2bfa005..51c42e4 100644 --- a/templates/admin_login.tpl +++ b/templates/admin_login.tpl @@ -21,11 +21,11 @@ {else} {/if} - {formhelp note=$output.note page=$output.page link=$output.link} + {formhelp note=$output.note page=$output.page ?? '' link=$output.link ?? ''} {else} {forminput label="checkbox"} {html_checkboxes name="$feature" values="y" checked=$gBitSystem->getConfig($feature) labels=false id=$feature} {tr}{$output.label}{/tr} - {formhelp note=$output.note page=$output.page link=$output.link} + {formhelp note=$output.note page=$output.page ?? '' link=$output.link ?? ''} {/forminput} {/if} {/forminput} @@ -98,7 +98,7 @@ {jstab title="Single Sign On"}
- {formfeedback hash=$authSettings.err} + {formfeedback hash=$authSettings.err ?? ''} {formlabel label="Authentication method"} {forminput} @@ -159,12 +159,12 @@ {forminput} {formlabel label=$output.label for=$feature} - {formhelp note=$output.note page=$output.page link=$output.link} + {formhelp note=$output.note page=$output.page ?? '' link=$output.link ?? ''} {/forminput} {else} {forminput label="checkbox"} {html_checkboxes name="$feature" values="y" checked=$gBitSystem->getConfig($feature) labels=false id=$feature} {tr}{$output.label}{/tr} - {formhelp note=$output.note page=$output.page link=$output.link} + {formhelp note=$output.note page=$output.page ?? '' link=$output.link ?? ''} {/forminput} {/if}
@@ -182,19 +182,19 @@ {forminput} {formlabel label=$output.label for=$feature} - {formhelp note=$output.note page=$output.page link=$output.link} + {formhelp note=$output.note page=$output.page ?? '' link=$output.link ?? ''} {/forminput} {else} {forminput label="checkbox"} {html_checkboxes name="$feature" values="y" checked=$gBitSystem->getConfig($feature) labels=false id=$feature} {tr}{$output.label}{/tr} - {formhelp note=$output.note page=$output.page link=$output.link} + {formhelp note=$output.note page=$output.page ?? '' link=$output.link ?? ''} {/forminput} {/if} {/foreach} {/jstab} {foreach from=$authSettings.avail item='method' key='meth_name'} - {if $method.options} + {if !empty($method.options)} {jstab title=$method.name} {foreach from=$method.options item='output' key='op_id'} @@ -212,7 +212,7 @@ {else} {/if} - {formhelp note=$output.note page=$output.page link=$output.link} + {formhelp note=$output.note page=$output.page ?? '' link=$output.link ?? ''} {/forminput} {/foreach} diff --git a/templates/admin_role_edit.tpl b/templates/admin_role_edit.tpl old mode 100644 new mode 100755 index 3d29954..d832b44 --- a/templates/admin_role_edit.tpl +++ b/templates/admin_role_edit.tpl @@ -10,7 +10,7 @@
-

{if $roleInfo.role_name}{tr}Administer Role{/tr}: {$roleInfo.role_name}{else}{tr}Create New Role{/tr}{/if}

+

{if !empty($roleInfo.role_name)}{tr}Administer Role{/tr}: {$roleInfo.role_name}{else}{tr}Create New Role{/tr}{/if}

@@ -19,30 +19,31 @@ {jstabs} {jstab title="Edit Role"} {form legend="Add or Edit a Role"} - + +
{formlabel label="Role" for="roles_role"} {forminput} - + {/forminput}
{formlabel label="Description" for="role_desc"} {forminput} - + {/forminput}
{formlabel label="Role home page" for="role_home"} {forminput} - + {formhelp note="Here you can enter the content id of any page, the wiki page name or the absolute path of any page you wish to use as a role home page. For this to work set the site homepage to Role Home" link="kernel/admin/index.php?page=features/General Settings"} Search for Content:
{html_options options=$contentTypes name=content_type_guid selected=$contentSelect} - + {formhelp note="Enter the title of the content you are looking for to receive an auto-suggest list of possibilities."} {* @@ -57,28 +58,28 @@
{formlabel label="After registration page" for="after_registration_page"} {forminput} - + {formhelp note="The same format than the Role home page. Used to redirect a user after his registration if other that the default after login page."} {/forminput}
{forminput label="checkbox"} - Default home page + Default home page {formhelp note="This is the home page if a user belongs to many roles. Only one role may be the default home. If none is selected, users/my.php is the default."} {/forminput}
{forminput label="checkbox"} - Auto members + Auto members {formhelp note="Users are automatically added to this role when registering at your site."} {/forminput}
{forminput label="checkbox"} - Is public + Is public {formhelp note="A user will be able to select this role at registration."} {/forminput}
@@ -90,11 +91,11 @@ {/form} {/jstab} - {if $roleInfo.role_id} + {if !empty($roleInfo.role_id)} {jstab title="Assign Permissions"} {form legend="Assign permissions"} - +
@@ -113,14 +114,14 @@ - - - - + + + + {foreach key=permName item=perm from=$allPerms} - + diff --git a/templates/admin_users.tpl b/templates/admin_users.tpl old mode 100644 new mode 100755 index 1b2a3fc..69edcd2 --- a/templates/admin_users.tpl +++ b/templates/admin_users.tpl @@ -17,7 +17,7 @@ {formlabel label=$output.label for=$feature} {forminput} {html_checkboxes name="settings[$feature]" values="y" checked=$gBitSystem->getConfig($feature) labels=false id=$feature} - {formhelp note=$output.note page=$output.link} + {formhelp note=$output.note page=$output.link|default:''} {/forminput} {/foreach} -- cgit v1.3
 {smartlink ititle="Name" isort="up.perm_name" role_id=$roleInfo.role_id offset=$offset package=$smarty.request.package}{smartlink ititle="Package" isort=package role_id=$roleInfo.role_id offset=$offset package=$smarty.request.package}{smartlink ititle="User Class" isort=perm_level role_id=$roleInfo.level offset=$offset package=$smarty.request.level}{smartlink ititle="Description" isort="up.perm_desc" role_id=$roleInfo.role_id offset=$offset package=$smarty.request.package}{smartlink ititle="Name" isort="up.perm_name" role_id=$roleInfo.role_id offset=$offset package=$smarty.request.package ?? ''}{smartlink ititle="Package" isort=package role_id=$roleInfo.role_id offset=$offset package=$smarty.request.package ?? ''}{smartlink ititle="User Class" isort=perm_level role_id=$roleInfo.level ?? '' offset=$offset package=$smarty.request.level ?? ''}{smartlink ititle="Description" isort="up.perm_desc" role_id=$roleInfo.role_id offset=$offset package=$smarty.request.package ?? ''}
{tr}{$perm.package}{/tr} {tr}{$perm.perm_level}{/tr}