forked from fa/breadcrumb-the-shire
Move breadcrumb rendering from individual page templates into the core topbar. Each page now sets $breadcrumbs in its action .php file; the topbar renders it automatically via the shared partial. - Remove global back/forward buttons and app-nav-history.js component - Remove Alt+Arrow keyboard shortcuts for history navigation - Render breadcrumb in topbar-left section (replaces button area) - Clean up breadcrumb CSS: context-neutral base (flex, no margin) - Recalculate sticky titlebar offset in details container - Migrate all 41 pages (core + helpdesk, audit, addressbook, api-docs) - Add missing breadcrumbs to addressbook detail view - Update architecture contract tests (nav-history references removed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
71 lines
2.1 KiB
PHTML
71 lines
2.1 KiB
PHTML
<?php
|
|
|
|
/**
|
|
* @var array<int, string> $errors
|
|
* @var array $form
|
|
*/
|
|
|
|
|
|
|
|
?>
|
|
<div class="app-details-container">
|
|
|
|
<section>
|
|
<?php
|
|
$titlebar = [
|
|
'title' => t('Create user'),
|
|
'backHref' => 'admin/users',
|
|
'backTitle' => t('Cancel'),
|
|
'actions' => [
|
|
[
|
|
'form' => 'user-form',
|
|
'name' => 'action',
|
|
'value' => 'create',
|
|
'class' => 'secondary outline',
|
|
'label' => t('Create'),
|
|
],
|
|
[
|
|
'form' => 'user-form',
|
|
'name' => 'action',
|
|
'value' => 'create_close',
|
|
'class' => 'primary',
|
|
'label' => t('Create & close'),
|
|
],
|
|
],
|
|
];
|
|
require templatePath('partials/app-details-titlebar.phtml');
|
|
?>
|
|
<?php
|
|
$validationSummaryErrors = $validationSummaryErrors ?? ($errors ?? []);
|
|
require templatePath('partials/app-details-validation-summary.phtml');
|
|
?>
|
|
<?php
|
|
$values = $form ?? [];
|
|
$passwordRequired = true;
|
|
$detailsOpenAll = true;
|
|
$passwordLabel = t('Password');
|
|
$passwordLegend = t('Password');
|
|
$passwordConfirmLabel = t('Password (again)');
|
|
$pageAuth = is_array($viewAuth['page'] ?? null) ? $viewAuth['page'] : [];
|
|
$showTenants = (bool) ($pageAuth['can_manage_assignments'] ?? false);
|
|
$showRoles = $showTenants;
|
|
$showDepartments = $showTenants;
|
|
$tenants = $tenants ?? [];
|
|
$roles = $roles ?? [];
|
|
$selectedTenantIds = $selectedTenantIds ?? [];
|
|
$selectedRoleIds = $selectedRoleIds ?? [];
|
|
$selectedDepartmentIds = $selectedDepartmentIds ?? [];
|
|
$departmentOptionsByTenant = $departmentOptionsByTenant ?? [];
|
|
$showCustomFieldsTab = true;
|
|
$canEditCustomFieldValues = (bool) ($pageAuth['can_edit_custom_field_values'] ?? false);
|
|
$customFieldDefinitionsByTenant = $customFieldDefinitionsByTenant ?? [];
|
|
$customFieldValueMap = $customFieldValueMap ?? [];
|
|
$customFieldPostedValues = $customFieldPostedValues ?? [];
|
|
$passwordMinLength = $passwordMinLength ?? 12;
|
|
$passwordHints = $passwordHints ?? [];
|
|
$ignoreTabStorage = true;
|
|
require __DIR__ . '/_form.phtml';
|
|
?>
|
|
</section>
|
|
</div>
|