Răsfoiți Sursa

Fix failing tests, update button icon and text according to feedback

parthiv-m 1 an în urmă
părinte
comite
788146012e
4 a modificat fișierele cu 6 adăugiri și 2 ștergeri
  1. 1 0
      i18n/en.json
  2. 1 1
      tpl/bootstrap.php
  3. 1 1
      tpl/bootstrap5.php
  4. 3 0
      tst/ViewTest.php

+ 1 - 0
i18n/en.json

@@ -26,6 +26,7 @@
     "JavaScript is required for %s to work. Sorry for the inconvenience.": "JavaScript is required for %s to work. Sorry for the inconvenience.",
     "%s requires a modern browser to work.": "%s requires a modern browser to work.",
     "New": "New",
+    "Start over": "Start over",
     "Create": "Create",
     "Clone": "Clone",
     "Raw text": "Raw text",

+ 1 - 1
tpl/bootstrap.php

@@ -497,7 +497,7 @@ endif;
 						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; ?>
+							<span class="glyphicon glyphicon-repeat"></span> <?php echo I18n::_('Start over'), PHP_EOL; ?>
 						</button>
 					<?php endif; ?>
 				</div>

+ 1 - 1
tpl/bootstrap5.php

@@ -362,7 +362,7 @@ endif;
 						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; ?>
+							<svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#repeat" /></svg> <?php echo I18n::_('Start over'), PHP_EOL; ?>
 						</button>
 					<?php endif; ?>
 				</div>

+ 3 - 0
tst/ViewTest.php

@@ -10,6 +10,8 @@ class ViewTest extends TestCase
 
     private static $status = '!*#@?$+';
 
+    private static $is_deleted = false;
+
     private static $formatters = array(
         'plaintext'          => 'Plain Text',
         'syntaxhighlighting' => 'Source Code',
@@ -38,6 +40,7 @@ class ViewTest extends TestCase
         $page->assign('BASEPATH', '');
         $page->assign('ERROR', self::$error);
         $page->assign('STATUS', self::$status);
+        $page->assign('ISDELETED', self::$is_deleted);
         $page->assign('VERSION', self::$version);
         $page->assign('DISCUSSION', true);
         $page->assign('OPENDISCUSSION', true);