Consolidate settings normalization tests
This commit is contained in:
@@ -18,15 +18,16 @@ $timeouts = [
|
||||
];
|
||||
|
||||
?>
|
||||
<div class="flash-stack" data-app-component="flash-auto-dismiss" role="status" aria-live="polite">
|
||||
<div class="app-toast-stack" data-app-component="flash-auto-dismiss" aria-live="polite">
|
||||
<?php foreach ($messages as $message) : ?>
|
||||
<?php $type = $message['type'] ?? 'info'; ?>
|
||||
<?php $timeout = $timeouts[$type] ?? 5000; ?>
|
||||
<div class="notice" data-variant="<?php e($type); ?>" data-flash-timeout="<?php e($timeout); ?>">
|
||||
<?php e(t($message['message'] ?? '')); ?>
|
||||
<?php $isAssertive = $type === 'error' || $type === 'warning'; ?>
|
||||
<div class="notice" data-variant="<?php e($type); ?>" data-flash-timeout="<?php e($timeout); ?>" role="<?php echo $isAssertive ? 'alert' : 'status'; ?>">
|
||||
<span><?php e(t($message['message'] ?? '')); ?></span>
|
||||
<form method="post" action="flash/dismiss/<?php e($message['id'] ?? ''); ?>">
|
||||
<input type="hidden" name="return" value="<?php e($returnTarget); ?>">
|
||||
<button type="submit" class="contrast outline small"><i class="bi bi-x"></i></button>
|
||||
<button type="submit" aria-label="<?php e(t('Dismiss')); ?>"><i class="bi bi-x-lg"></i></button>
|
||||
<?php Session::getCsrfInput(); ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -36,7 +36,7 @@ $moduleTopbarSlots = is_array($moduleSlots['topbar.right_item'] ?? null) ? $modu
|
||||
<li>
|
||||
<a id="global-forward" data-tooltip-pos="bottom" data-tooltip="<?php e(t('Forward')); ?> (Alt+→)" title="<?php e(t('Forward')); ?> (Alt+→)" aria-label="<?php e(t('Forward')); ?> (Alt+→)" href="admin"><i class="bi bi-arrow-right"></i></a>
|
||||
</li>
|
||||
<li id="async-messages" role="status" aria-live="polite"></li>
|
||||
<li id="async-messages" role="status" aria-live="polite" aria-hidden="true"></li>
|
||||
</ul>
|
||||
<div class="app-topbar-center" aria-hidden="true"></div>
|
||||
<ul class="app-topbar-right">
|
||||
|
||||
Reference in New Issue
Block a user