Bugzilla – Attachment 159096 Details for
Bug 35362
Update patron module pop-up windows with consistent footer markup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35362: Update patron module pop-up windows with consistent footer markup
Bug-35362-Update-patron-module-pop-up-windows-with.patch (text/plain), 5.30 KB, created by
Owen Leonard
on 2023-11-17 16:46:46 UTC
(
hide
)
Description:
Bug 35362: Update patron module pop-up windows with consistent footer markup
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-11-17 16:46:46 UTC
Size:
5.30 KB
patch
obsolete
>From 333e8165a248c406fe585a7f0b35b924dbc7495f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 17 Nov 2023 16:29:39 +0000 >Subject: [PATCH] Bug 35362: Update patron module pop-up windows with > consistent footer markup > >This patch updates two patron-related templates in order to style >submission and close buttons in a fixed footer at the bottom of the >window, with markup consistent with other pop-up windows. > >The patch also updates the "Update child" popup js so that it uses >the same window-opening function we use elsewhere. I also added form >validation to the category selection form to help prevent errors if >someone submits the form without making a selection. > >To test, apply the patch and go to the Patrons module > >- Click "New patron" and add a patron with the same first and last name > of a patron already in the database. >- When you save the new patron record the page should reload with an > error message: "Duplicate patron record?" >- Click "View existing record" >- A pop-up window should appear with patron information. >- Confirm that the window's footer looks correct. > >- Locate a patron with an age-limited child category. In the sample data > the "Juvenile" category works. >- View the patron detail page and click More -> Update child to adult > patron. >- A pop-up window should appear with patron category selection options. >- Try submitting the form without making a selection. You should see a > message about fields being required. >- Select a category and submit the form to confirm that the controls > work correctly. >--- > .../en/modules/members/moremember-brief.tt | 13 +++++++----- > .../prog/en/modules/members/update-child.tt | 21 ++++++++++++++----- > .../intranet-tmpl/prog/js/members-menu.js | 2 +- > 3 files changed, 25 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >index ddaec613c9..4537470b64 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >@@ -92,10 +92,13 @@ > </div> > </div> > </div> >-<div class="row"> >- <div class="col-xs-12"> >- <fieldset class="action"><input type="button" class="close" value="Close window" /></fieldset> >- </div> >-</div> >+ >+ <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> > > [% INCLUDE 'intranet-bottom.inc' popup_window=1 %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt >index 1acdf6546a..a250419a4f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt >@@ -19,7 +19,7 @@ > <h1> Choose adult category </h1> > > [% IF patron_categories %] >- <form method="post" action="update-child.pl"> >+ <form method="post" id="updatechildf" action="update-child.pl"> > <fieldset> > <table id="catst"> > <thead> >@@ -44,11 +44,15 @@ > <input type="hidden" name="op" value="update" /> > <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" /> > <input type="hidden" name="cattype" value="[% cattype | html %]" /> >- <fieldset class="action"> >- <input class="submit" type="submit" value="Submit" /> >- <a href="#" class="cancel close">Cancel</a> >- </fieldset> > </fieldset> >+ <nav class="navbar navbar-default navbar-fixed-bottom"> >+ <div class="container-fluid"> >+ <fieldset class="action"> >+ <input class="btn btn-primary" type="submit" value="Submit" /> >+ <button type="button" class="btn btn-default close_window">Cancel</button> >+ </fieldset> >+ </div> >+ </nav> > </form> > [% END %] > [% END %] >@@ -67,6 +71,13 @@ > ], > "bPaginate": false > })); >+ $("#updatechildf").validate({ >+ rules: { >+ catcode: { >+ required: true, >+ }, >+ } >+ }); > }); > </script> > [% IF ( SUCCESS ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >index a730bb4732..31c537c88f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >@@ -127,7 +127,7 @@ function confirm_updatechild() { > > function update_child() { > if( number_of_adult_categories > 1 ){ >- window.open('/cgi-bin/koha/members/update-child.pl?op=multi&borrowernumber=' + borrowernumber,'UpdateChild','width=400,height=300,toolbar=no,scrollbars=yes,resizable=yes'); >+ openWindow('/cgi-bin/koha/members/update-child.pl?op=multi&borrowernumber=' + borrowernumber,'UpdateChild'); > } else { > confirm_updatechild(); > } >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35362
:
159096
|
159118
|
162390
|
165609
|
165610
|
166682