Fix conditional display of 'New' paste button on alert

This commit is contained in:
parthiv-m 2024-10-14 12:54:36 -04:00
parent 5acecdb879
commit 773c56fc94
2 changed files with 14 additions and 6 deletions

View file

@ -493,9 +493,13 @@ endif;
<div id="status" role="alert" class="clearfix alert alert-<?php echo (bool)$ISDELETED ? 'success' : 'info'; echo empty($STATUS) ? ' hidden' : '' ?>">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
<?php echo I18n::encode($STATUS), PHP_EOL; ?>
<button type="button" class="btn btn-default pull-right" id="new-from-alert">
<span class="glyphicon glyphicon-file"></span> <?php echo I18n::_('New'), PHP_EOL; ?>
</button>
<?php
if ((bool)$ISDELETED):
?>
<button type="button" class="btn btn-default pull-right" id="new-from-alert">
<span class="glyphicon glyphicon-file"></span> <?php echo I18n::_('New'), PHP_EOL; ?>
</button>
<?php endif; ?>
</div>
<div id="errormessage" role="alert" class="<?php echo empty($ERROR) ? 'hidden' : '' ?> alert alert-danger">
<span class="glyphicon glyphicon-alert" aria-hidden="true"></span>

View file

@ -358,9 +358,13 @@ endif;
<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#info-circle" /></svg>
<?php echo I18n::encode($STATUS), PHP_EOL; ?>
</div>
<button type="button" class="btn btn-secondary" id="new-from-alert">
<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#file-earmark" /></svg> <?php echo I18n::_('New'), PHP_EOL; ?>
</button>
<?php
if ((bool)$ISDELETED):
?>
<button type="button" class="btn btn-secondary" id="new-from-alert">
<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#file-earmark" /></svg> <?php echo I18n::_('New'), PHP_EOL; ?>
</button>
<?php endif; ?>
</div>
<div id="errormessage" role="alert" class="<?php echo empty($ERROR) ? 'hidden' : '' ?> alert alert-danger">
<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#exclamation-triangle" /></svg>