Files
breadcrumb-the-shire/templates/partials/app-list-purge-action.phtml

32 lines
1.1 KiB
PHTML
Raw Permalink Normal View History

2026-03-04 15:56:58 +01:00
<?php
use MintyPHP\Session;
$listPurgeEnabled = (bool) ($listPurgeEnabled ?? false);
if (!$listPurgeEnabled) {
return;
}
$listPurgeFormId = trim((string) ($listPurgeFormId ?? ''));
$listPurgeAction = trim((string) ($listPurgeAction ?? ''));
$listPurgeConfirmMessage = (string) ($listPurgeConfirmMessage ?? '');
$listPurgeButtonLabel = (string) ($listPurgeButtonLabel ?? '');
$listPurgeButtonClass = trim((string) ($listPurgeButtonClass ?? 'outline secondary'));
$listPurgeButtonIconClass = trim((string) ($listPurgeButtonIconClass ?? 'bi bi-trash'));
if ($listPurgeFormId === '' || $listPurgeAction === '' || $listPurgeButtonLabel === '') {
return;
}
?>
<form id="<?php e($listPurgeFormId); ?>" method="post" action="<?php e($listPurgeAction); ?>">
<?php Session::getCsrfInput(); ?>
</form>
<button
type="submit"
form="<?php e($listPurgeFormId); ?>"
class="<?php e($listPurgeButtonClass); ?>"
<?php if ($listPurgeConfirmMessage !== ''): ?>data-confirm-message="<?php e($listPurgeConfirmMessage); ?>"<?php endif; ?>
>
<i class="<?php e($listPurgeButtonIconClass); ?>"></i> <?php e($listPurgeButtonLabel); ?>
</button>