1
0

setting UI/UX

This commit is contained in:
2026-03-12 12:11:31 +01:00
parent 24a6b79f7a
commit eb748b2fa4

View File

@@ -233,24 +233,25 @@ $ssoStatusTiles = [
<blockquote data-variant="info">
<?php e(t('Define custom fields here. They appear per user in the "Custom fields" tab and can be maintained there.')); ?>
</blockquote>
<hr>
<details name="tenant-custom-fields-create">
<summary><?php e(t('Add custom field')); ?> +</summary>
<hr>
<fieldset>
<details class="app-details-card" name="tenant-custom-fields-create">
<summary>
<span class="app-details-card-summary-title">
<?php e(t('Add custom field')); ?>
</span>
</summary>
<div class="app-details-card-container">
<div class="grid">
<label for="tenant-custom-field-label">
<span><?php e(t('Label')); ?></span>
<input
id="tenant-custom-field-label"
form="tenant-custom-field-create-form"
<label for="tenant-custom-field-label">
<span><?php e(t('Label')); ?></span>
<input
id="tenant-custom-field-label"
form="tenant-custom-field-create-form"
required
type="text"
name="label"
<?php e($disabledAttr); ?>
>
<small class="muted"><?php e(t('The label is shown in user custom fields and in address book filters.')); ?></small>
</label>
name="label"
<?php e($disabledAttr); ?>>
<small class="muted"><?php e(t('The label is shown in user custom fields and in address book filters.')); ?></small>
</label>
<label for="tenant-custom-field-type">
<span><?php e(t('Field type')); ?></span>
@@ -260,8 +261,7 @@ $ssoStatusTiles = [
name="type"
data-custom-field-type-source
data-custom-field-group="tenant-custom-field-create"
<?php e($disabledAttr); ?>
>
<?php e($disabledAttr); ?>>
<option value="text"><?php e(t('Text')); ?></option>
<option value="textarea"><?php e(t('Textarea')); ?></option>
<option value="select"><?php e(t('Select')); ?></option>
@@ -274,7 +274,6 @@ $ssoStatusTiles = [
</div>
<div class="grid">
<fieldset data-custom-field-filterable-target data-custom-field-group="tenant-custom-field-create">
<legend><small><?php e(t('Filterable')); ?></small></legend>
<label class="app-field">
<input form="tenant-custom-field-create-form" role="switch" type="checkbox" name="is_filterable" value="1"
data-custom-field-filterable-input
@@ -284,7 +283,6 @@ $ssoStatusTiles = [
<small class="muted"><?php e(t('Filterable fields are available in address book filters.')); ?></small>
</fieldset>
<fieldset>
<legend><small><?php e(t('Active')); ?></small></legend>
<label class="app-field">
<input form="tenant-custom-field-create-form" role="switch" type="checkbox" name="active" value="1" checked
<?php e($disabledAttr); ?>>
@@ -302,17 +300,15 @@ $ssoStatusTiles = [
name="options_text"
rows="5"
placeholder="<?php e(t('Example: manager|Manager')); ?>"
<?php e($readonlyAttr); ?>
></textarea>
<?php e($readonlyAttr); ?>></textarea>
<small class="muted"><?php e(t('One option per line. Optional format: key|Label.')); ?></small>
</label>
</div>
<button type="submit" class="primary" form="tenant-custom-field-create-form" <?php e($disabledAttr); ?>>
<?php e(t('Add custom field')); ?>
</button>
</fieldset>
</div>
</details>
<hr>
<?php if (!$customFieldDefinitions): ?>
<?php
$emptyState = [
@@ -347,91 +343,91 @@ $ssoStatusTiles = [
. $optionLabel;
}
?>
<details name="tenant-custom-fields">
<details class="app-details-card" name="tenant-custom-fields">
<summary>
<?php e((string) ($definition['label'] ?? '')); ?>
<span class="badge" data-variant="neutral"><?php e($definitionTypeLabel); ?></span>
<span class="app-details-card-summary-title">
<?php e((string) ($definition['label'] ?? '')); ?>
</span>
<span class="app-details-card-summary-meta">
<span class="badge" data-variant="neutral"><?php e($definitionTypeLabel); ?></span>
</span>
</summary>
<hr>
<div class="grid">
<label>
<span><?php e(t('Label')); ?></span>
<input
type="text"
form="<?php e($updateFormId); ?>"
name="label"
required
value="<?php e((string) ($definition['label'] ?? '')); ?>"
<?php e($readonlyAttr); ?>
>
<small class="muted"><?php e(t('The label is shown in user custom fields and in address book filters.')); ?></small>
</label>
<label>
<span><?php e(t('Field type')); ?></span>
<select
form="<?php e($updateFormId); ?>"
name="type"
data-custom-field-type-source
data-custom-field-group="<?php e($typeGroupId); ?>"
<?php e($disabledAttr); ?>
>
<?php foreach (['text', 'textarea', 'select', 'multiselect', 'boolean', 'date'] as $typeOption): ?>
<option value="<?php e($typeOption); ?>" <?php e($definitionType === $typeOption ? 'selected' : ''); ?>>
<?php e(t(ucfirst($typeOption))); ?>
</option>
<?php endforeach; ?>
</select>
<small class="muted"><?php e(t('The field type controls input and filter behavior.')); ?></small>
</label>
</div>
<div class="grid">
<fieldset data-custom-field-filterable-target data-custom-field-group="<?php e($typeGroupId); ?>">
<legend><small><?php e(t('Filterable')); ?></small></legend>
<label class="app-field">
<input type="checkbox" role="switch" form="<?php e($updateFormId); ?>" name="is_filterable" value="1"
data-custom-field-filterable-input
<?php e(!empty($definition['is_filterable']) ? 'checked' : ''); ?>
<?php e($disabledAttr); ?>>
<span><?php e(t('Filterable')); ?></span>
<div class="app-details-card-container">
<div class="grid">
<label>
<span><?php e(t('Label')); ?></span>
<input
type="text"
form="<?php e($updateFormId); ?>"
name="label"
required
value="<?php e((string) ($definition['label'] ?? '')); ?>"
<?php e($readonlyAttr); ?>>
<small class="muted"><?php e(t('The label is shown in user custom fields and in address book filters.')); ?></small>
</label>
<small class="muted"><?php e(t('Filterable fields are available in address book filters.')); ?></small>
</fieldset>
<fieldset>
<legend><small><?php e(t('Active')); ?></small></legend>
<label class="app-field">
<input type="hidden" form="<?php e($updateFormId); ?>" name="active" value="0">
<input type="checkbox" role="switch" form="<?php e($updateFormId); ?>" name="active" value="1"
<?php e(!empty($definition['active']) ? 'checked' : ''); ?>
<label>
<span><?php e(t('Field type')); ?></span>
<select
form="<?php e($updateFormId); ?>"
name="type"
data-custom-field-type-source
data-custom-field-group="<?php e($typeGroupId); ?>"
<?php e($disabledAttr); ?>>
<span><?php e(t('Active')); ?></span>
<?php foreach (['text', 'textarea', 'select', 'multiselect', 'boolean', 'date'] as $typeOption): ?>
<option value="<?php e($typeOption); ?>" <?php e($definitionType === $typeOption ? 'selected' : ''); ?>>
<?php e(t(ucfirst($typeOption))); ?>
</option>
<?php endforeach; ?>
</select>
<small class="muted"><?php e(t('The field type controls input and filter behavior.')); ?></small>
</label>
<small class="muted"><?php e(t('Inactive fields are hidden in forms and filters.')); ?></small>
</fieldset>
</div>
<div data-custom-field-options-target data-custom-field-group="<?php e($typeGroupId); ?>">
<label>
<span><?php e(t('Options (one per line)')); ?></span>
<textarea
form="<?php e($updateFormId); ?>"
name="options_text"
rows="5"
placeholder="<?php e(t('Example: manager|Manager')); ?>"
<?php e($readonlyAttr); ?>
><?php e($definitionOptionsText); ?></textarea>
</label>
<small class="muted"><?php e(t('One option per line. Optional format: key|Label.')); ?></small>
</div>
<hr>
<div class="grid">
<button type="submit" class="primary" form="<?php e($updateFormId); ?>" <?php e($disabledAttr); ?>>
<?php e(t('Save')); ?>
</button>
<button type="submit" class="danger" form="<?php e($deleteFormId); ?>" <?php e($disabledAttr); ?>>
<?php e(t('Delete custom field')); ?>
</button>
</div>
<div class="grid">
<fieldset data-custom-field-filterable-target data-custom-field-group="<?php e($typeGroupId); ?>">
<label class="app-field">
<input type="checkbox" role="switch" form="<?php e($updateFormId); ?>" name="is_filterable" value="1"
data-custom-field-filterable-input
<?php e(!empty($definition['is_filterable']) ? 'checked' : ''); ?>
<?php e($disabledAttr); ?>>
<span><?php e(t('Filterable')); ?></span>
</label>
<small class="muted"><?php e(t('Filterable fields are available in address book filters.')); ?></small>
</fieldset>
<fieldset>
<label class="app-field">
<input type="hidden" form="<?php e($updateFormId); ?>" name="active" value="0">
<input type="checkbox" role="switch" form="<?php e($updateFormId); ?>" name="active" value="1"
<?php e(!empty($definition['active']) ? 'checked' : ''); ?>
<?php e($disabledAttr); ?>>
<span><?php e(t('Active')); ?></span>
</label>
<small class="muted"><?php e(t('Inactive fields are hidden in forms and filters.')); ?></small>
</fieldset>
</div>
<div data-custom-field-options-target data-custom-field-group="<?php e($typeGroupId); ?>">
<label>
<span><?php e(t('Options (one per line)')); ?></span>
<textarea
form="<?php e($updateFormId); ?>"
name="options_text"
rows="5"
placeholder="<?php e(t('Example: manager|Manager')); ?>"
<?php e($readonlyAttr); ?>><?php e($definitionOptionsText); ?></textarea>
</label>
<small class="muted"><?php e(t('One option per line. Optional format: key|Label.')); ?></small>
</div>
<hr>
<div class="grid">
<button type="submit" class="primary" form="<?php e($updateFormId); ?>" <?php e($disabledAttr); ?>>
<?php e(t('Save')); ?>
</button>
<button type="submit" class="danger" form="<?php e($deleteFormId); ?>" <?php e($disabledAttr); ?>>
<?php e(t('Delete custom field')); ?>
</button>
</div>
</div>
</details>
<hr>
<?php endforeach; ?>
<?php endif; ?>
</div>
@@ -464,8 +460,7 @@ $ssoStatusTiles = [
value="1"
data-tenant-sso-enabled
<?php e($microsoftEnabled ? 'checked' : ''); ?>
<?php e($disabledAttr); ?>
>
<?php e($disabledAttr); ?>>
<span><?php e(t('Enable Microsoft login for this tenant')); ?></span>
</label>
<small class="muted"><?php e(t('Required for Microsoft login.')); ?></small>
@@ -477,8 +472,7 @@ $ssoStatusTiles = [
name="entra_tenant_id"
value="<?php e($entraTenantId); ?>"
placeholder="00000000-0000-0000-0000-000000000000"
<?php e($readonlyAttr); ?>
>
<?php e($readonlyAttr); ?>>
</label>
<label class="app-field">
<input
@@ -487,8 +481,7 @@ $ssoStatusTiles = [
name="enforce_microsoft_login"
value="1"
<?php e($microsoftEnforce ? 'checked' : ''); ?>
<?php e($disabledAttr); ?>
>
<?php e($disabledAttr); ?>>
<span><?php e(t('Disable password login for this tenant login')); ?></span>
</label>
<small class="muted"><?php e(t('Microsoft-only login requires a complete configuration')); ?></small>
@@ -526,8 +519,7 @@ $ssoStatusTiles = [
value="1"
data-tenant-sso-sync-toggle
<?php e($syncProfileOnLogin ? 'checked' : ''); ?>
<?php e($disabledAttr); ?>
>
<?php e($disabledAttr); ?>>
<span><?php e(t('Profile sync on Microsoft login')); ?></span>
</label>
<small class="muted"><?php e(t('User profile fields are global and affect all tenants of this user')); ?></small>
@@ -542,8 +534,7 @@ $ssoStatusTiles = [
name="sync_profile_fields[]"
value="<?php e($syncFieldKey); ?>"
<?php e(in_array($syncFieldKey, $syncProfileFields, true) ? 'checked' : ''); ?>
<?php e($disabledAttr); ?>
>
<?php e($disabledAttr); ?>>
<span><?php e(t($syncFieldLabel)); ?></span>
</label>
<?php endforeach; ?>
@@ -567,8 +558,7 @@ $ssoStatusTiles = [
value="1"
data-tenant-sso-shared-toggle
<?php e($useSharedApp ? 'checked' : ''); ?>
<?php e($disabledAttr); ?>
>
<?php e($disabledAttr); ?>>
<span><?php e(t('Use shared app credentials from settings')); ?></span>
</label>
<small class="muted"><?php e(t('Override only if this tenant needs a separate Entra app.')); ?></small>
@@ -602,9 +592,9 @@ $ssoStatusTiles = [
<input type="color" name="primary_color" id="primary_color"
value="<?php e($primaryColor !== '' ? $primaryColor : $defaultPrimaryColor); ?>"
<?php e($readonlyAttr); ?> />
<div>
<?php e(t('Choose color')); ?>
</div>
<div>
<?php e(t('Choose color')); ?>
</div>
</label>
<small class="muted"><?php e(t('The primary color affects buttons and accent elements across the app.')); ?></small>
</fieldset>
@@ -708,4 +698,4 @@ $ssoStatusTiles = [
<?php Session::getCsrfInput(); ?>
</form>
<?php endforeach; ?>
<?php endif; ?>
<?php endif; ?>