2026-02-04 23:31:53 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var array $values
|
|
|
|
|
* @var string|null $formId
|
|
|
|
|
* @var bool $detailsOpenAll
|
|
|
|
|
* @var bool $isReadOnly
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
* @var bool $showDangerZone
|
|
|
|
|
* @var string|null $dangerZoneDeleteFormId
|
|
|
|
|
* @var string|null $dangerZoneWarning
|
|
|
|
|
* @var string|null $dangerZoneActionLabel
|
2026-02-04 23:31:53 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
use MintyPHP\Session;
|
|
|
|
|
|
|
|
|
|
$values = $values ?? [];
|
|
|
|
|
$formId = $formId ?? 'role-form';
|
|
|
|
|
$detailsOpenAll = $detailsOpenAll ?? false;
|
|
|
|
|
$isReadOnly = $isReadOnly ?? false;
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
$showDangerZone = (bool) ($showDangerZone ?? false);
|
|
|
|
|
$dangerZoneDeleteFormId = (string) ($dangerZoneDeleteFormId ?? '');
|
|
|
|
|
$dangerZoneWarning = (string) ($dangerZoneWarning ?? t('This action cannot be undone.'));
|
|
|
|
|
$dangerZoneActionLabel = (string) ($dangerZoneActionLabel ?? t('Delete'));
|
2026-02-04 23:31:53 +01:00
|
|
|
$detailsOpenAttr = $detailsOpenAll ? 'open' : '';
|
|
|
|
|
$readonlyAttr = $isReadOnly ? 'readonly' : '';
|
2026-02-11 19:28:12 +01:00
|
|
|
$disabledAttr = $isReadOnly ? 'disabled' : '';
|
2026-02-04 23:31:53 +01:00
|
|
|
|
|
|
|
|
?>
|
2026-03-04 15:56:58 +01:00
|
|
|
<form id="<?php e($formId); ?>" method="post" data-standard-detail-form="1">
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
<div class="app-tabs" data-tabs data-tabs-param="tab" data-tabs-storage-key="admin-role-form">
|
|
|
|
|
<div class="app-tabs-nav">
|
|
|
|
|
<button type="button" data-tab="basic" data-tab-default><?php e(t('Master data')); ?></button>
|
|
|
|
|
<?php if (!empty($permissions)): ?>
|
|
|
|
|
<button type="button" data-tab="permissions"><?php e(t('Permissions')); ?></button>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<button type="button" data-tab="visibility"><?php e(t('Visibility')); ?></button>
|
|
|
|
|
<?php if ($showDangerZone && $dangerZoneDeleteFormId !== ''): ?>
|
|
|
|
|
<button type="button" data-tab="danger"><?php e(t('Danger zone')); ?></button>
|
|
|
|
|
<?php endif; ?>
|
2026-02-11 19:28:12 +01:00
|
|
|
</div>
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
|
|
|
|
|
<div data-tab-panel="basic">
|
|
|
|
|
<div class="grid">
|
|
|
|
|
<label for="description">
|
|
|
|
|
<span><?php e(t('Description')); ?></span>
|
|
|
|
|
<input required type="text" name="description" id="description" value="<?php e($values['description'] ?? ''); ?>" <?php e($readonlyAttr); ?> />
|
|
|
|
|
</label>
|
|
|
|
|
<div class="grid">
|
|
|
|
|
<label for="code">
|
|
|
|
|
<span><?php e(t('Code')); ?></span>
|
|
|
|
|
<input type="text" name="code" id="code" value="<?php e($values['code'] ?? ''); ?>" <?php e($readonlyAttr); ?> />
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php if (!empty($permissions)): ?>
|
|
|
|
|
<div data-tab-panel="permissions">
|
|
|
|
|
<?php multiSelectForm('role-permissions', 'permission_ids', 'Assigned permissions', 'Select permissions', $permissions, $selectedPermissionIds ?? [], $isReadOnly, ['description', 'key']); ?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
<div data-tab-panel="visibility">
|
|
|
|
|
<?php
|
|
|
|
|
$statusFieldName = 'active';
|
|
|
|
|
$statusFieldId = 'role-active';
|
|
|
|
|
$statusFieldValue = (string) ($values['active'] ?? '1');
|
|
|
|
|
require templatePath('partials/app-visibility-status-field.phtml');
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php if ($showDangerZone && $dangerZoneDeleteFormId !== ''): ?>
|
|
|
|
|
<div data-tab-panel="danger">
|
|
|
|
|
<?php
|
|
|
|
|
$dangerFormId = $dangerZoneDeleteFormId;
|
|
|
|
|
$dangerLegend = t('Delete');
|
|
|
|
|
$dangerWarning = $dangerZoneWarning;
|
|
|
|
|
$dangerButtonLabel = $dangerZoneActionLabel;
|
|
|
|
|
require templatePath('partials/app-danger-zone-delete-field.phtml');
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</div>
|
2026-02-04 23:31:53 +01:00
|
|
|
<?php Session::getCsrfInput(); ?>
|
|
|
|
|
</form>
|