Bug 2310: display tooltips explaining why patron menu items are disabled
With some staff client menus options are displayed as disabled when the logged in user doesn't have permission to perform that function. This patch adds Bootstrap tooltips to patron menu items with text explaining why they are disabled. To test, log in as a user who lacks permission to modify patrons or set permissions. Open a patron record in circulation or patrons. Hovering over renew, delete, and set permissions links (in the patron toolbar "More" menu) should trigger a tooltip with a brief explanation. Test the "Update child to adult patron" link by viewing an adult patron. A separate patch will address catalog menu items. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> New tooltip texts are translatable, patch passes all tests and QA script. Tested according to test plan in Chromium and Firefox. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
b8a3933ca3
commit
01c101a6b9
|
|
@ -2570,6 +2570,12 @@ button.closebtn{padding:0;cursor:pointer;background:transparent;border:0;-webkit
|
|||
font-size: 13px;
|
||||
}
|
||||
|
||||
.tooltip-inner {
|
||||
white-space:pre-wrap;
|
||||
}
|
||||
|
||||
/* End Bootstrap overrides */
|
||||
|
||||
.waiting {
|
||||
cursor: wait;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ $(document).ready(function(){
|
|||
$(".btn-group").removeClass("open");
|
||||
});[% END %]
|
||||
[% END %]
|
||||
|
||||
$("#updatechild, #patronflags, #renewpatron, #deletepatron").tooltip();
|
||||
$("#exportcheckins").click(function(){
|
||||
export_barcodes();
|
||||
$(".btn-group").removeClass("open");
|
||||
|
|
@ -133,22 +133,22 @@ function searchToHold(){
|
|||
[% IF ( CAN_user_borrowers ) %]
|
||||
<li><a id="renewpatron" href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&cardnumber=[% cardnumber %]&destination=[% destination %]&reregistration=y">Renew patron</a></li>
|
||||
[% ELSE %]
|
||||
<li class="disabled"><a id="renewpatron" href="#">Renew patron</a></li>
|
||||
<li class="disabled"><a data-toggle="tooltip" data-placement="left" title="You are not authorized to renew patrons" id="renewpatron" href="#">Renew patron</a></li>
|
||||
[% END %]
|
||||
[% IF ( CAN_user_permissions ) %]
|
||||
<li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]">Set permissions</a></li>
|
||||
[% ELSE %]
|
||||
<li class="disabled"><a id="patronflags" href="#">Set permissions</a></li>
|
||||
<li class="disabled"><a data-toggle="tooltip" data-placement="left" title="You are not authorized to set permissions" id="patronflags" href="#">Set permissions</a></li>
|
||||
[% END %]
|
||||
[% IF ( CAN_user_borrowers ) %]
|
||||
<li><a id="deletepatron" href="#">Delete</a></li>
|
||||
[% ELSE %]
|
||||
<li class="disabled"><a id="deletepatron" href="#">Delete</a></li>
|
||||
<li class="disabled"><a data-toggle="tooltip" data-placement="left" title="You are not authorized to delete patrons" id="deletepatron" href="#">Delete</a></li>
|
||||
[% END %]
|
||||
[% IF ( is_child ) %]
|
||||
<li><a id="updatechild" href="#">Update child to adult patron</a></li>
|
||||
[% ELSE %]
|
||||
<li class="disabled"><a id="updatechild" href="#">Update child to adult patron</a></li></li>
|
||||
<li class="disabled"><a data-toggle="tooltip" data-placement="left" title="Patron is an adult" id="updatechild" href="#">Update child to adult patron</a></li></li>
|
||||
[% END %]
|
||||
<li><a id="exportcheckins" href="#">Export today's checked in barcodes</a></li>
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Reference in New Issue