From d2ada44d849e7e166a421a8962d5fe82543e8963 Mon Sep 17 00:00:00 2001 From: Viola Elsenhans <elsenhans@ub.uni-leipzig.de> Date: Wed, 26 Apr 2023 14:51:58 +0200 Subject: [PATCH] refs #23786 [finc] fix errors, add comments in cart.phtml * add comment in toolbar.phtml --- .../RecordDriver/DefaultRecord/toolbar.phtml | 1 + themes/finc/templates/cart/cart.phtml | 20 +++++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml index 7f3d42b762c..fdb24dcec2e 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml @@ -22,6 +22,7 @@ <a class="cite-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Cite')?>" rel="nofollow"><i class="fa fa-asterisk" aria-hidden="true"></i> <?=$this->transEsc('Cite this')?></a> </li> <?php endif; ?> + <?php /* finc: fix unauthorized link to staff view #22620 */ ?> <?php if ($this->tabs['Details'] ?? false && $this->config()->get('config')->Site->showStaffViewInLightbox ?? false): ?> <li> diff --git a/themes/finc/templates/cart/cart.phtml b/themes/finc/templates/cart/cart.phtml index 4f097f059fd..765a40e1c48 100644 --- a/themes/finc/templates/cart/cart.phtml +++ b/themes/finc/templates/cart/cart.phtml @@ -23,6 +23,7 @@ </label> </div> <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* finc: remove double value="1" here and the following buttons */ ?> <button type="submit" class="toolbar-btn btn-type-save" name="saveCart" title="<?=$this->transEscAttr('bookbag_save')?>" value="1"> <?=$this->transEsc('Save')?> </button> @@ -35,6 +36,7 @@ <?=$this->transEsc('Export')?> </button> <?php endif; ?> + <?php /* finc: remove dropdown-toggle for print button */ ?> <button type="submit" class="toolbar-btn btn-type-print" name="print" title="<?=$this->transEscAttr('print_selected')?>" value="1"> <?=$this->transEsc('Print')?> </button> @@ -45,12 +47,8 @@ <?php /* finc: remove role="none" of li-elements */ /* finc adds roles 'menu', 'presentation' (to mark <li> as irrelevant for content) and 'menuitem' for correct accessibility - CK */ ?> <ul class="dropdown-menu" role="menu" aria-labelledby="cart-delete-label"> - <li role="presentation"> - <a href="javascript:" id="cart-confirm-delete" title="<?=$this->transEscAttr('confirm_delete')?>" role="menuitem"><?=$this->transEscAttr('confirm_dialog_yes')?></a> - </li> - <li role="presentation"> - <a role="menuitem"><?=$this->transEsc('confirm_dialog_no')?></a> - </li> + <li role="presentation"><a role="menuitem" id="cart-confirm-delete" title="<?=$this->transEscAttr('confirm_delete')?>"><?=$this->transEsc('confirm_dialog_yes')?></a></li> + <li role="presentation"><a role="menuitem"><?=$this->transEsc('confirm_dialog_no')?></a></li> </ul> </div> <div class="btn-group"> @@ -59,12 +57,8 @@ </button> <?php /* finc adds roles 'menu', 'presentation' (to mark <li> as irrelevant for content) and 'menuitem' for correct accessibility - CK */ ?> <ul class="dropdown-menu" role="menu" aria-labelledby="cart-empty-label"> - <li role="presentation"> - <a href="javascript:" id="cart-confirm-empty" title="<?=$this->transEscAttr('bookbag_confirm_empty')?>" role="menuitem"><?=$this->transEsc('confirm_dialog_yes')?></a> - </li> - <li role="presentation"> - <a id="cart-refuse-empty" role="menuitem"><?=$this->transEsc('confirm_dialog_no')?></a> - </li> + <li role="presentation"><a role="menuitem" id="cart-confirm-empty" title="<?=$this->transEscAttr('bookbag_confirm_empty')?>"><?=$this->transEsc('confirm_dialog_yes')?></a></li> + <li role="presentation"><a role="menuitem" id="cart-refuse-empty"><?=$this->transEsc('confirm_dialog_no')?></a></li> </ul> </div> </div> @@ -85,7 +79,7 @@ submitFormWithButton(this, 'empty'); }); $("#cart-refuse-empty").click(function($e) { - $('.fa.fa-spinner').remove(); + $('.fa.fa-spinner').remove(); }); JS; ?> -- GitLab