Bugzilla – Attachment 190480 Details for
Bug 40498
Improve style of list transfer form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40498: Improve style of list transfer form
Bug-40498-Improve-style-of-list-transfer-form.patch (text/plain), 7.96 KB, created by
David Nind
on 2025-12-13 09:36:41 UTC
(
hide
)
Description:
Bug 40498: Improve style of list transfer form
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-12-13 09:36:41 UTC
Size:
7.96 KB
patch
obsolete
>From 28ba334d73b4f7eef2f9b470ccc3d2b5103d7523 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 6 Nov 2025 13:09:59 +0000 >Subject: [PATCH] Bug 40498: Improve style of list transfer form > >This patch makes some style changes to the list transfer form. Since it >needs the same CSS that is used on the circulation page, the CSS block >is moved from circulation.tt to staff-global.scss. > >The patch also changes the behavior of the form so that the "New owner" >line doesn't appear until after a patron has been selected. > >To test, apply the patch and rebuild the staff interface CSS. > >- If necessary, create a public list. >- From the list of public lists, click the "Transfer" button. >- Verify that the form looks correct. The patron search field should > match the search field shown when you navigate directly to > circulation.pl >- Search for a patron who has permission to manage public lists. > - After you select a patron, a new line should appear: > "New owner: [name]" >- Click "Transfer" and confirm that the process works correctly. > >Sponsored-by: Athens County Public Libraries >Signed-off-by: David Nind <david@davidnind.com> >--- > .../prog/css/src/staff-global.scss | 8 ++ > .../prog/en/modules/circ/circulation.tt | 11 +-- > .../prog/en/modules/virtualshelves/shelves.tt | 89 +++++++++---------- > 3 files changed, 52 insertions(+), 56 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index d9ad8218cb..98797c40fc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -1431,6 +1431,14 @@ dd { > display: inline-block; > } > >+.patron_autocomplete { >+ border: 1px solid #C7C7CE; >+ border-radius: .3rem; >+ line-height: 1.5; >+ padding: .375rem .75rem; >+ transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; >+} >+ > #addColumn, > #delColumn { > background-color: transparent; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 672d27da17..cfe5367e31 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -30,15 +30,6 @@ > display: flex; > gap: 0.5rem; > } >- #patron_checkout_search input[type="text"] { >- border: 1px solid #c7c7ce; >- border-radius: 0.3rem; >- line-height: 1.5; >- padding: 0.375rem 0.75rem; >- transition: >- border-color 0.15s ease-in-out, >- box-shadow 0.15s ease-in-out; >- } > </style> > [% END %] > </head> >@@ -1019,7 +1010,7 @@ > [% ELSE %] > <form action="/cgi-bin/koha/circ/circulation.pl" id="patronsearch" method="get"> > <fieldset id="patron_checkout_search"> >- <input autocomplete="off" id="findborrower_main" name="findborrower" type="text" placeholder="Enter patron card number or partial name" size="40" /> >+ <input autocomplete="off" id="findborrower_main" class="patron_autocomplete" name="findborrower" type="text" placeholder="Enter patron card number or partial name" size="40" /> > [% IF ( stickyduedate ) %] > <input type="hidden" name="duedatespec" value="[% duedatespec | html %]" /> > <input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index f002d0abf3..b494ee72d3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -27,11 +27,14 @@ > [% END %]</title > > > [% INCLUDE 'doc-head-close.inc' %] >-<style> >- textarea { >- width: 100%; >- } >-</style> >+[% FILTER collapse %] >+ ] >+ <style> >+ textarea { >+ width: 100%; >+ } >+ </style> >+[% END %] > > [% BLOCK list_permissions %] > <li> >@@ -205,27 +208,25 @@ > > <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="transferform" method="post"> > [% INCLUDE 'csrf-token.inc' %] >- <fieldset> >+ <fieldset class="rows"> >+ <legend class="visually-hidden">Transfer ownership</legend> > <input type="hidden" name="op" value="cud-transfer" /> > <input type="hidden" name="public" value="1" /> > <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" /> >- >- <div> >- <label for="find_patron">Search for new owner: </label> >- <input autocomplete="off" id="find_patron" type="text" style="width:150px" class="noEnterSubmit" /> >- </div> >- >- <br /> >- <div> >- <label for="find_patron">New owner: </label> >- <span id="new_owner_name"></span> >- </div> >- >- <br /> >- <fieldset class="action"> >- <input type="submit" class="btn btn-primary" value="Transfer" /> >- <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1" class="cancel">Cancel</a> >- </fieldset> >+ <ol> >+ <li> >+ <label for="find_patron">Search for new owner: </label> >+ <input autocomplete="off" id="find_patron" type="text" size="40" class="patron_autocomplete noEnterSubmit" placeholder="Enter patron card number or partial name" /> >+ </li> >+ <li style="display:none"> >+ <label for="find_patron">New owner: </label> >+ <span id="new_owner_name"></span> >+ </li> >+ </ol> >+ </fieldset> >+ <fieldset class="action"> >+ <input type="submit" class="btn btn-primary" value="Transfer" /> >+ <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1" class="cancel">Cancel</a> > </fieldset> > </form> > [% END # /IF op == transfer %] >@@ -957,30 +958,26 @@ > }); > > [% END %] >- </script> >- [% IF op == 'transfer' %] >- <script> >- $(document).ready(function () { >- patron_autocomplete($("#find_patron"), { >- "on-select-add-to": { >- container: $("#new_owner_name"), >- input_name: "new_owner", >- }, >- "on-select-callback": function (event, ui) { >- $("#find_patron").val("").focus(); >- return false; >- }, >- }); >+ [% IF op == 'transfer' %] >+ patron_autocomplete($("#find_patron"), { >+ "on-select-add-to": { >+ container: $("#new_owner_name"), >+ input_name: "new_owner", >+ }, >+ "on-select-callback": function (event, ui) { >+ $("#find_patron").val("").focus(); >+ return false; >+ }, >+ }); > >- $("#transferform").submit(function () { >- if (!$('input[name="new_owner"]').val()) { >- alert(_("Please select a new owner first")); >- return false; >- } >- return true; >- }); >+ $("#transferform").submit(function () { >+ if (!$('input[name="new_owner"]').val()) { >+ alert(_("Please select a new owner first")); >+ return false; >+ } >+ return true; > }); >- </script> >- [% END %] >+ [% END %] >+ </script> > [% END %] > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.39.5
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 40498
:
184599
|
184667
|
189170
| 190480