Bug 34553: Update send list and send cart popup footers
This patch updates the templates behind the "send cart" and "send list" pop-ups in order to make the style of the footer consistent with some recently-updated similar examples, like the catalog's Z39.50 search popup. The patch also makes a minor change to our global JavaScript include so we can get away from using the "close" class as a trigger for closing a pop-up window. Bootstrap has a built-in "close" class that we always have to override. "close_window" is added as another class to use, and the other instances can be cleaned up overy time. To test, apply the patch and perform a catalog search in the staff interface. - Add one or more items to the cart. - Open the cart popup and click the "Send" button. - In the pop-up window, confirm that the footer looks correct. - Test the process of using the tab key between input fields and submit/cancel buttons. All controls should be accessible. - Test the "Cancel" button to confirm that it closes the window. - Reopen the window and test sending the email. - On the confirmation page, confirm that the footer looks correct and that the "Close window" button works. - Test the same processes in the Lists module: View a list in the staff interface and test the process of sending a list. Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
4b588121e4
commit
160bfe32ad
|
|
@ -67,7 +67,7 @@
|
|||
</div>
|
||||
<a class="btn btn-default" href="basket.pl" id="print_cart"><i class="fa fa-print"></i> Print</a>
|
||||
<a class="btn btn-default" href="basket.pl" id="empty_cart"><i class="fa fa-trash-can"></i> Empty and close</a>
|
||||
<a class="btn btn-default close" href="basket.pl"><i class="fa fa-times-circle"></i> Hide window</a>
|
||||
<a class="btn btn-default close_window" href="basket.pl"><i class="fa fa-times-circle"></i> Hide window</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,18 +7,27 @@
|
|||
[% END %]</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
</head>
|
||||
<body style="padding: 1em;" id="cart_sendbasketform" class="cart">
|
||||
<body id="cart_sendbasketform" class="cart">
|
||||
<div class="container">[% IF ( email_add ) %]
|
||||
|
||||
[% IF ( SENT ) %]
|
||||
<h3>Message sent</h3>
|
||||
<p>The cart was sent to: [% email_add | html %]</p>
|
||||
<p><a class="focus close" href="#">Close window</a></p>
|
||||
<div class="dialog message">
|
||||
<h1>Message sent</h1>
|
||||
<p>The cart was sent to: [% email_add | html %]</p>
|
||||
</div>
|
||||
[% END %]
|
||||
[% IF ( error ) %]
|
||||
<p>Problem sending the cart...</p>
|
||||
<div class="dialog alert">Problem sending the cart...</div>
|
||||
[% END %]
|
||||
|
||||
|
||||
<nav class="navbar navbar-default navbar-fixed-bottom">
|
||||
<div class="container-fluid">
|
||||
<fieldset class="action">
|
||||
<button type="button" class="btn btn-default close_window focus">Close window</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
[% ELSE %]
|
||||
|
||||
[% INCLUDE 'blocking_errors.inc' %]
|
||||
|
|
@ -36,9 +45,17 @@
|
|||
</li>
|
||||
</ol>
|
||||
</fieldset>
|
||||
<fieldset class="action"> <input type="submit" class="btn btn-primary" value="Send" /> <a class="cancel close" href="#">Cancel</a> </fieldset>
|
||||
<input type="hidden" name="bib_list" value="[% bib_list | html %]" />
|
||||
<input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
|
||||
|
||||
<nav class="navbar navbar-default navbar-fixed-bottom">
|
||||
<div class="container-fluid">
|
||||
<fieldset class="action">
|
||||
<input type="submit" class="btn btn-primary" value="Send" />
|
||||
<button type="button" class="btn btn-default close_window">Cancel</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
</nav>
|
||||
</form>
|
||||
|
||||
[% END %]</div>
|
||||
|
|
|
|||
|
|
@ -8,19 +8,26 @@
|
|||
[% END %]</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
</head>
|
||||
<body id="lists_sendshelfform" class="lists" style="padding: 1em;">
|
||||
<body id="lists_sendshelfform" class="lists">
|
||||
[% INCLUDE 'blocking_errors.inc' %]
|
||||
<div class="container">[% IF ( email ) %]
|
||||
<div class="container-fluid">[% IF ( email ) %]
|
||||
|
||||
[% IF ( SENT ) %]
|
||||
<h3>Message sent</h3>
|
||||
<p>The list was sent to: [% email | html %]</p>
|
||||
<p><a class="close focus" href="#">Close window</a></p>
|
||||
[% END %]
|
||||
[% IF ( error ) %]
|
||||
<p>Problem sending the list...</p>
|
||||
<p>Problem sending the list...</p>
|
||||
[% END %]
|
||||
|
||||
|
||||
<nav class="navbar navbar-default navbar-fixed-bottom">
|
||||
<div class="container-fluid">
|
||||
<fieldset class="action">
|
||||
<button class="btn btn-default close_window focus">Close window</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
[% ELSE %]
|
||||
|
||||
<form action="/cgi-bin/koha/virtualshelves/sendshelf.pl" method="post">
|
||||
|
|
@ -38,7 +45,15 @@
|
|||
<li>
|
||||
<input type="hidden" name="shelfid" value="[% shelfid | html %]" />
|
||||
</li></ol></fieldset>
|
||||
<fieldset class="action"> <input type="submit" class="btn btn-primary" value="Send" /> <a class="cancel close" href="#">Cancel</a> </fieldset>
|
||||
|
||||
<nav class="navbar navbar-default navbar-fixed-bottom">
|
||||
<div class="container-fluid">
|
||||
<fieldset class="action">
|
||||
<input type="submit" class="btn btn-primary" value="Send" />
|
||||
<button class="btn btn-default close_window">Cancel</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
</nav>
|
||||
</form>
|
||||
|
||||
[% END %]</div>
|
||||
|
|
|
|||
|
|
@ -945,7 +945,7 @@
|
|||
[% IF op == 'view' %]
|
||||
|
||||
function sendList(){
|
||||
open(CGIBIN+'virtualshelves/sendshelf.pl?shelfid=[% shelf.shelfnumber | html %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
|
||||
openWindow( CGIBIN + 'virtualshelves/sendshelf.pl?shelfid=[% shelf.shelfnumber | html %]' );
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
|
|
|||
|
|
@ -367,11 +367,8 @@ function quit() {
|
|||
function sendBasket() {
|
||||
var valCookie = readCookie(nameCookie);
|
||||
var strCookie = nameParam + "=" + valCookie;
|
||||
|
||||
var loc = CGIBIN + "basket/sendbasket.pl?" + strCookie;
|
||||
|
||||
var optWin="scrollbars=no,resizable=no,height=400,width=650,top=50,left=100";
|
||||
open(loc,"win_form",optWin);
|
||||
openWindow( loc, "win_form" );
|
||||
}
|
||||
|
||||
function downloadBasket() {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ $(document).ready(function() {
|
|||
$( e.target.hash ).find("input:text:first").focus();
|
||||
});
|
||||
|
||||
$(".close").click(function(){ window.close(); });
|
||||
$(".close, .close_window").click(function(){ window.close(); });
|
||||
|
||||
$("#checkin_search form").preventDoubleFormSubmit();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue