Преглед изворни кода

Fix conditional display of 'New' paste button on alert

parthiv-m пре 1 година
родитељ
комит
773c56fc94
2 измењених фајлова са 14 додато и 6 уклоњено
  1. 7 3
      tpl/bootstrap.php
  2. 7 3
      tpl/bootstrap5.php

+ 7 - 3
tpl/bootstrap.php

@@ -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>

+ 7 - 3
tpl/bootstrap5.php

@@ -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>