added details card component
This commit is contained in:
@@ -282,99 +282,128 @@ $disabledAttr = $isReadOnly ? 'disabled' : '';
|
||||
</div>
|
||||
|
||||
<div data-tab-panel="security">
|
||||
<fieldset>
|
||||
<legend>
|
||||
<small>
|
||||
<?php e(t($appRegistrationDesc)); ?>
|
||||
</small>
|
||||
</legend>
|
||||
<label class="app-field">
|
||||
<input type="checkbox" name="app_registration" value="1" <?php e($appRegistration ? 'checked' : ''); ?>
|
||||
<?php e($disabledAttr); ?>>
|
||||
<span><?php e(t('Allow registration')); ?> <span class="badge" data-variant="info"><?php e(t('Cached')); ?></span></span>
|
||||
</label>
|
||||
</fieldset>
|
||||
<hr>
|
||||
<fieldset>
|
||||
<legend><small><?php e(t('User lifecycle policy')); ?></small></legend>
|
||||
<div class="grid">
|
||||
<label class="app-field">
|
||||
<span><?php e(t('Deactivate users after inactivity (days)')); ?></span>
|
||||
<input type="number" name="user_inactivity_deactivate_days"
|
||||
value="<?php e((string) $userInactivityDeactivateDays); ?>" min="0" max="3650" step="1"
|
||||
<?php e($readonlyAttr); ?>>
|
||||
<small><?php e(t($userInactivityDeactivateDaysDesc)); ?></small>
|
||||
</label>
|
||||
<label class="app-field">
|
||||
<span><?php e(t('Delete inactive users after (days)')); ?></span>
|
||||
<input type="number" name="user_inactivity_delete_days"
|
||||
value="<?php e((string) $userInactivityDeleteDays); ?>" min="0" max="3650" step="1"
|
||||
<?php e($readonlyAttr); ?>>
|
||||
<small><?php e(t($userInactivityDeleteDaysDesc)); ?></small>
|
||||
</label>
|
||||
<details class="app-details-card" name="settings-security-registration" data-details-key="settings-security-registration">
|
||||
<summary>
|
||||
<?php e(t('Allow registration')); ?>:
|
||||
<?php e($appRegistration ? t('Enabled') : t('Disabled')); ?>
|
||||
</summary>
|
||||
<div class="app-details-card-container">
|
||||
<blockquote data-variant="info">
|
||||
<small><?php e(t('Registration controls whether new users can create an account.')); ?></small>
|
||||
</blockquote>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<small>
|
||||
<?php e(t($appRegistrationDesc)); ?>
|
||||
</small>
|
||||
</legend>
|
||||
<label class="app-field">
|
||||
<input type="checkbox" name="app_registration" value="1" <?php e($appRegistration ? 'checked' : ''); ?>
|
||||
<?php e($disabledAttr); ?>>
|
||||
<span><?php e(t('Allow registration')); ?> <span class="badge" data-variant="info"><?php e(t('Cached')); ?></span></span>
|
||||
</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
<small class="muted"><?php e(t('0 disables this rule')); ?></small>
|
||||
<small class="muted"><?php e(t('Deletion starts after user was set inactive')); ?></small>
|
||||
<small class="muted"><?php e(t('Privileged admins are excluded from automatic lifecycle actions')); ?></small>
|
||||
<?php if ($canUpdateSettings): ?>
|
||||
</details>
|
||||
|
||||
<details class="app-details-card" name="settings-security-session" data-details-key="settings-security-session" open>
|
||||
<summary>
|
||||
<?php e(t('Session policy')); ?>:
|
||||
<?php e((string) $sessionIdleTimeoutMinutes); ?> / <?php e((string) $sessionAbsoluteTimeoutHours); ?>
|
||||
</summary>
|
||||
<div class="app-details-card-container">
|
||||
|
||||
<blockquote data-variant="info">
|
||||
<small>
|
||||
<?php e(t('Session limits define how long logged-in users stay signed in.')); ?>
|
||||
</small>
|
||||
</blockquote>
|
||||
<div class="grid">
|
||||
<label class="app-field">
|
||||
<span><?php e(t('Session idle timeout (minutes)')); ?></span>
|
||||
<input type="number" name="session_idle_timeout_minutes"
|
||||
value="<?php e((string) $sessionIdleTimeoutMinutes); ?>" min="5" max="1440" step="1"
|
||||
<?php e($readonlyAttr); ?>>
|
||||
<small><?php e(t($sessionIdleTimeoutMinutesDesc)); ?></small>
|
||||
<small class="muted"><?php e(t('Allowed range: 5-1440 minutes (default: 30)')); ?></small>
|
||||
</label>
|
||||
<label class="app-field">
|
||||
<span><?php e(t('Session absolute timeout (hours)')); ?></span>
|
||||
<input type="number" name="session_absolute_timeout_hours"
|
||||
value="<?php e((string) $sessionAbsoluteTimeoutHours); ?>" min="1" max="72" step="1"
|
||||
<?php e($readonlyAttr); ?>>
|
||||
<small><?php e(t($sessionAbsoluteTimeoutHoursDesc)); ?></small>
|
||||
<small class="muted"><?php e(t('Allowed range: 1-72 hours (default: 8)')); ?></small>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
<details class="app-details-card" name="settings-security-user-lifecycle" data-details-key="settings-security-user-lifecycle">
|
||||
<summary>
|
||||
<?php e(t('User lifecycle policy')); ?>:
|
||||
<?php e((string) $userInactivityDeactivateDays); ?> / <?php e((string) $userInactivityDeleteDays); ?>
|
||||
</summary>
|
||||
<div class="app-details-card-container">
|
||||
<blockquote data-variant="info">
|
||||
<small><?php e(t('User lifecycle defines when inactive users are deactivated or deleted.')); ?></small>
|
||||
</blockquote>
|
||||
<div class="grid">
|
||||
<label class="app-field">
|
||||
<span><?php e(t('Deactivate users after inactivity (days)')); ?></span>
|
||||
<input type="number" name="user_inactivity_deactivate_days"
|
||||
value="<?php e((string) $userInactivityDeactivateDays); ?>" min="0" max="3650" step="1"
|
||||
<?php e($readonlyAttr); ?>>
|
||||
<small><?php e(t($userInactivityDeactivateDaysDesc)); ?> - <?php e(t('0 disables this rule')); ?></small>
|
||||
</label>
|
||||
<label class="app-field">
|
||||
<span><?php e(t('Delete inactive users after (days)')); ?></span>
|
||||
<input type="number" name="user_inactivity_delete_days"
|
||||
value="<?php e((string) $userInactivityDeleteDays); ?>" min="0" max="3650" step="1"
|
||||
<?php e($readonlyAttr); ?>>
|
||||
<small><?php e(t($userInactivityDeleteDaysDesc)); ?> - <?php e(t('0 disables this rule')); ?></small>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<?php if ($canUpdateSettings): ?>
|
||||
<button type="submit" class="danger" formnovalidate
|
||||
formaction="admin/settings/run-user-lifecycle"
|
||||
formmethod="post"
|
||||
data-detail-confirm-message="<?php e(t('Run user lifecycle now?')); ?>"
|
||||
data-detail-action-kind="danger">
|
||||
<?php e(t('Run user lifecycle now')); ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</details>
|
||||
<details class="app-details-card" name="settings-security-system-audit" data-details-key="settings-security-system-audit">
|
||||
<summary>
|
||||
<?php e(t('System audit')); ?>:
|
||||
<?php e($systemAuditEnabled ? t('Enabled') : t('Disabled')); ?>
|
||||
</summary>
|
||||
<div class="app-details-card-container">
|
||||
<blockquote data-variant="info">
|
||||
<small><?php e(t('System audit controls whether security events are logged and how long they are kept.')); ?></small>
|
||||
</blockquote>
|
||||
<label class="app-field">
|
||||
<input type="checkbox" name="system_audit_enabled" value="1" <?php e($systemAuditEnabled ? 'checked' : ''); ?> <?php e($disabledAttr); ?>>
|
||||
<span><?php e(t('Enable system audit log')); ?></span>
|
||||
</label>
|
||||
<hr>
|
||||
<button type="submit" class="outline warning" formnovalidate
|
||||
formaction="admin/settings/run-user-lifecycle"
|
||||
formmethod="post"
|
||||
data-detail-confirm-message="<?php e(t('Run user lifecycle now?')); ?>"
|
||||
data-detail-action-kind="danger">
|
||||
<?php e(t('Run user lifecycle now')); ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
<hr>
|
||||
<fieldset>
|
||||
<legend><small><?php e(t('Session policy')); ?></small></legend>
|
||||
<blockquote data-variant="info">
|
||||
<?php e(t('Session limits define how long logged-in users stay signed in.')); ?>
|
||||
</blockquote>
|
||||
<small class="muted"><?php e(t('Idle timeout signs users out after no activity.')); ?></small>
|
||||
<small class="muted"><?php e(t('New limits apply on each user\'s next request.')); ?></small>
|
||||
<div class="grid">
|
||||
<label class="app-field">
|
||||
<span><?php e(t('Session idle timeout (minutes)')); ?></span>
|
||||
<input type="number" name="session_idle_timeout_minutes"
|
||||
value="<?php e((string) $sessionIdleTimeoutMinutes); ?>" min="5" max="1440" step="1"
|
||||
<span><?php e(t('Retention (days)')); ?></span>
|
||||
<input
|
||||
type="number"
|
||||
name="system_audit_retention_days"
|
||||
value="<?php e((string) $systemAuditRetentionDays); ?>"
|
||||
min="30"
|
||||
max="1095"
|
||||
step="1"
|
||||
<?php e($readonlyAttr); ?>>
|
||||
<small><?php e(t($sessionIdleTimeoutMinutesDesc)); ?></small>
|
||||
<small class="muted"><?php e(t('Allowed range: 5-1440 minutes (default: 30)')); ?></small>
|
||||
</label>
|
||||
<label class="app-field">
|
||||
<span><?php e(t('Session absolute timeout (hours)')); ?></span>
|
||||
<input type="number" name="session_absolute_timeout_hours"
|
||||
value="<?php e((string) $sessionAbsoluteTimeoutHours); ?>" min="1" max="72" step="1"
|
||||
<?php e($readonlyAttr); ?>>
|
||||
<small><?php e(t($sessionAbsoluteTimeoutHoursDesc)); ?></small>
|
||||
<small class="muted"><?php e(t('Allowed range: 1-72 hours (default: 8)')); ?></small>
|
||||
<small><?php e(t($systemAuditRetentionDaysDesc)); ?></small>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
<hr>
|
||||
<fieldset>
|
||||
<legend><small><?php e(t('System audit')); ?></small></legend>
|
||||
<label class="app-field">
|
||||
<input type="checkbox" name="system_audit_enabled" value="1" <?php e($systemAuditEnabled ? 'checked' : ''); ?> <?php e($disabledAttr); ?>>
|
||||
<span><?php e(t('Enable system audit log')); ?></span>
|
||||
<small><?php e(t($systemAuditEnabledDesc)); ?></small>
|
||||
</label>
|
||||
<label class="app-field">
|
||||
<span><?php e(t('Retention (days)')); ?></span>
|
||||
<input
|
||||
type="number"
|
||||
name="system_audit_retention_days"
|
||||
value="<?php e((string) $systemAuditRetentionDays); ?>"
|
||||
min="30"
|
||||
max="1095"
|
||||
step="1"
|
||||
<?php e($readonlyAttr); ?>>
|
||||
<small><?php e(t($systemAuditRetentionDaysDesc)); ?></small>
|
||||
</label>
|
||||
</fieldset>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<div data-tab-panel="telemetry">
|
||||
|
||||
Reference in New Issue
Block a user