Bugzilla – Attachment 195460 Details for
Bug 42099
Update course reserve pages to use grid layout for forms
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 42099: Update course reserve pages to use grid layout for forms
Bug-42099-Update-course-reserve-pages-to-use-grid-.patch (text/plain), 26.62 KB, created by
Owen Leonard
on 2026-03-16 11:29:31 UTC
(
hide
)
Description:
Bug 42099: Update course reserve pages to use grid layout for forms
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2026-03-16 11:29:31 UTC
Size:
26.62 KB
patch
obsolete
>From 2adb43f0b1fe4aac3ff12693ee805ee958758c5c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 12 Feb 2026 15:41:47 -0500 >Subject: [PATCH] Bug 42099: Update course reserve pages to use grid layout for > forms > >This patch updates course reserve templates with new markup and >CSS for layout forms using CSS grids. > >To test, apply the patch rebuild the staff interface CSS. > >Check the following pages, confirming that the "New" and >"Edit" versions of the form look correct in each case: > >- Course reserves -> New course >- Course reserves -> Course -> Add reserves >- Course reserves -> Course -> Batch add reserves >- Course reserves -> Course -> Batch remove reserves > >Sponsored-by: Athens County Public Libraries >--- > .../course_reserves/add_items-step1.tt | 28 +++-- > .../course_reserves/add_items-step2.tt | 75 +++++++++---- > .../course_reserves/batch_add_items.tt | 103 ++++++++++++----- > .../modules/course_reserves/batch_rm_items.tt | 13 ++- > .../prog/en/modules/course_reserves/course.tt | 106 ++++++++++++------ > 5 files changed, 222 insertions(+), 103 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt >index 2f2f4f89976..25c1600311d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt >@@ -51,24 +51,28 @@ > <input type="hidden" name="course_id" value="[% course.course_id | html %]" /> > <input type="hidden" name="op" value="lookup" /> > >- <fieldset class="rows"> >+ <fieldset class="fg"> > <legend>Add items by barcode</legend> >- <ol> >- <li> >+ <div class="fg-row input-md"> >+ <div class="fg-label"> > <label class="required" for="barcode">Item barcode:</label> >- <input id="barcode" name="barcode" class="focus" type="text" /> >- </li> >- </ol> >+ </div> >+ <div class="fg-input"> >+ <input id="barcode" name="barcode" class="focus" type="text" maxlength="20" /> >+ </div> >+ </div> > </fieldset> > >- <fieldset class="rows"> >+ <fieldset class="fg"> > <legend>Or use biblionumber of a bibliographic record</legend> >- <ol> >- <li> >+ <div class="fg-row input-sm"> >+ <div class="fg-label"> > <label class="required" for="biblionumber">Biblionumber:</label> >- <input id="biblionumber" name="biblionumber" type="text" /> >- </li> >- </ol> >+ </div> >+ <div class="fg-input"> >+ <input id="biblionumber" name="biblionumber" type="text" maxlength="11" /> >+ </div> >+ </div> > </fieldset> > > <fieldset class="action"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt >index efc7675163d..75917d2eda0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt >@@ -69,23 +69,29 @@ > <input type="hidden" name="op" value="cud-add" /> > > [% IF item # adding an item to course items %] >- <fieldset class="rows"> >+ <fieldset class="fg"> > [% IF is_edit || course_reserve %] > <legend>[% tpx("Editing course reserve item", "Editing {title}", { title = item_title }) | $raw %]</legend> > [% ELSE %] > <legend>[% tpx("Adding course reserve item", "Adding {title}", { title = item_title }) | $raw %]</legend> > [% END %] >- <ol> >- <li> >+ >+ <div class="fg-row"> >+ <div class="fg-label"> > <span class="label">Barcode:</span> >+ </div> >+ <div class="fg-text"> > <span id="barcode">[% item.barcode | html %]</span> > <input type="hidden" name="itemnumber" value="[% item.itemnumber | html %]" /> >- </li> >+ </div> >+ </div> > >- [% IF item_level_itypes %] >- <li> >+ [% IF item_level_itypes %] >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="itype">Item type:</label> >- >+ </div> >+ <div class="fg-input"> > [% IF course_item.itype_enabled %] > <input type="checkbox" class="field-toggle" data-pulldown="itype" value="1" name="itype_enabled" id="itype_enabled" checked="checked" /> > [% ELSE %] >@@ -102,12 +108,15 @@ > [% END %] > [% END %] > </select> >- </li> >- [% END %] >+ </div> >+ </div> >+ [% END %] > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="ccode">Collection:</label> >- >+ </div> >+ <div class="fg-input"> > [% IF course_item.ccode_enabled %] > <input type="checkbox" class="field-toggle" data-pulldown="ccode" value="1" name="ccode_enabled" id="ccode_enabled" checked="checked" /> > [% ELSE %] >@@ -124,11 +133,15 @@ > [% END %] > [% END %] > </select> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="location">Shelving location:</label> >+ </div> > >+ <div class="fg-input"> > [% IF course_item.location_enabled %] > <input type="checkbox" class="field-toggle" data-pulldown="location" value="1" name="location_enabled" id="location_enabled" checked="checked" /> > [% ELSE %] >@@ -145,11 +158,15 @@ > [% END %] > [% END %] > </select> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="homebranch">Home library:</label> >+ </div> > >+ <div class="fg-input"> > [% IF course_item.homebranch_enabled %] > <input type="checkbox" value="1" class="field-toggle" data-pulldown="homebranch" name="homebranch_enabled" id="homebranch_enabled" checked /> > [% ELSE %] >@@ -166,11 +183,15 @@ > [% END %] > [% END %] > </select> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="holdingbranch">Holding library:</label> >+ </div> > >+ <div class="fg-input"> > [% IF course_item.holdingbranch_enabled %] > <input type="checkbox" value="1" class="field-toggle" data-pulldown="holdingbranch" name="holdingbranch_enabled" id="holdingbranch_enabled" checked="checked" /> > [% ELSE %] >@@ -187,18 +208,26 @@ > [% END %] > [% END %] > </select> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="staff_note">Staff note:</label> >+ </div> >+ <div class="fg-input"> > <textarea name="staff_note" id="staff_note">[% course_reserve.staff_note | html %]</textarea> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="public_note">Public note:</label> >+ </div> >+ <div class="fg-input"> > <textarea name="public_note" id="public_note">[% course_reserve.public_note | html %]</textarea> >- </li> >- </ol> >+ </div> >+ </div> > </fieldset> > <p> > Checking the box next to the field label will enable changes to that field. Leave boxes unchecked to make no change.<br /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt >index ab6fb7f3ed6..f56ecf8cdc0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt >@@ -51,16 +51,23 @@ > <input type="hidden" name="course_id" value="[% course.course_id | html %]" /> > <input type="hidden" name="op" value="cud-add" /> > >- <fieldset class="rows"> >+ <fieldset class="fg"> > <legend>Add items: scan barcodes</legend> >- <ol> >- <li> >+ >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="barcodes">Item barcodes:</label> >+ </div> >+ <div class="fg-input"> > <textarea rows="20" cols="50" id="barcodes" name="barcodes" class="focus"></textarea> >- </li> >- [% IF item_level_itypes %] >- <li> >+ </div> >+ </div> >+ [% IF item_level_itypes %] >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="itype">Item type:</label> >+ </div> >+ <div class="fg-input"> > <input type="checkbox" class="field-toggle" data-pulldown="itype" value="1" name="itype_enabled" id="itype_enabled" /> > <select id="itype" name="itype" disabled="disabled"> > <option value=""></option> >@@ -68,12 +75,16 @@ > [% FOREACH it IN ItemTypes.Get() %] > <option value="[% it.itemtype | html %]">[% it.description | html %]</option> > [% END %] >- </select> >- </li> >- [% END %] >+ </select></div >+ > >+ </div> >+ [% END %] > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="ccode">Collection:</label> >+ </div> >+ <div class="fg-input"> > <input type="checkbox" class="field-toggle" data-pulldown="ccode" value="1" name="ccode_enabled" id="ccode_enabled" /> > <select id="ccode" name="ccode" disabled="disabled"> > <option value=""></option> >@@ -81,10 +92,14 @@ > <option value="[% c.authorised_value | html %]">[% c.lib | html %]</option> > [% END %] > </select> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="location">Shelving location:</label> >+ </div> >+ <div class="fg-input"> > <input type="checkbox" class="field-toggle" data-pulldown="location" value="1" name="location_enabled" id="location_enabled" /> > <select id="location" name="location" disabled="disabled"> > <option value=""></option> >@@ -92,10 +107,14 @@ > <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option> > [% END %] > </select> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="homebranch">Home library:</label> >+ </div> >+ <div class="fg-input"> > <input type="checkbox" value="1" class="field-toggle" data-pulldown="homebranch" name="homebranch_enabled" id="homebranch_enabled" /> > <select id="homebranch" name="homebranch" disabled="disabled"> > <option value=""></option> >@@ -103,10 +122,14 @@ > <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option> > [% END %] > </select> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="holdingbranch">Holding library:</label> >+ </div> >+ <div class="fg-input"> > <input type="checkbox" value="1" class="field-toggle" data-pulldown="holdingbranch" name="holdingbranch_enabled" id="holdingbranch_enabled" /> > <select id="holdingbranch" name="holdingbranch" disabled="disabled"> > <option value=""></option> >@@ -114,18 +137,26 @@ > <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option> > [% END %] > </select> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="item_staff_note">Staff note:</label> >+ </div> >+ <div class="fg-input"> > <textarea name="item_staff_note" id="item_staff_note">[% course_reserve.staff_note | html %]</textarea> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="item_public_note">Public note:</label> >+ </div> >+ <div class="fg-input"> > <textarea name="item_public_note" id="item_public_note">[% course_reserve.public_note | html %]</textarea> >- </li> >- </ol> >+ </div> >+ </div> > </fieldset> > > <p> >@@ -133,24 +164,34 @@ > Any items with existing course reserves will have their <em>on reserve</em> values updated. > </p> > >- <fieldset class="rows"> >+ <fieldset class="fg"> > <legend>Or use biblionumbers of bibliographic records</legend> >- <ol> >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="biblionumbers">Biblionumbers:</label> >+ </div> >+ <div class="fg-input"> > <textarea rows="20" cols="50" id="biblionumbers" name="biblionumbers"></textarea> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="biblio_staff_note">Staff note:</label> >+ </div> >+ <div class="fg-input"> > <textarea name="biblio_staff_note" id="biblio_staff_note">[% course_reserve.staff_note | html %]</textarea> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="biblio_public_note">Public note:</label> >+ </div> >+ <div class="fg-input"> > <textarea name="biblio_public_note" id="biblio_public_note">[% course_reserve.public_note | html %]</textarea> >- </li> >- </ol> >+ </div> >+ </div> > </fieldset> > > <fieldset class="action"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt >index 6ba7d3f9978..8251e24fe8e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt >@@ -35,14 +35,17 @@ > <form method="post" action="/cgi-bin/koha/course_reserves/batch_rm_items.pl"> > [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="op" value="cud-batch_rm" /> >- <fieldset class="rows"> >+ <fieldset class="fg"> > <legend>Remove items by barcode</legend> >- <ol> >- <li> >+ >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="barcodes">Item barcodes:</label> >+ </div> >+ <div class="fg-input"> > <textarea rows="20" cols="50" id="barcodes" name="barcodes" class="focus"></textarea> >- </li> >- </ol> >+ </div> >+ </div> > </fieldset> > <fieldset class="action"> > <p>All course reserve items will be deleted from all courses to which they are attached.</p> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt >index 78d961d858a..3a9419bd352 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt >@@ -67,7 +67,7 @@ > [% ELSE %] > <input type="hidden" name="op" value="cud-add" /> > [% END %] >- <fieldset class="rows"> >+ <fieldset class="fg"> > <legend class="visually-hidden"> > [% IF course_name %] > [% tx("Edit {course_name}", { course_name = course_em }) | $raw %] >@@ -75,9 +75,11 @@ > <span>New course</span> > [% END %] > </legend> >- <ol> >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="department">Department:</label> >+ </div> >+ <div class="fg-input"> > <select id="department" name="department" required="required" class="required"> > <option value="">Select a department</option> > >@@ -89,29 +91,45 @@ > [% END %] > [% END %] > </select> >- <span class="required">Required</span> >- </li> >+ </div> >+ <div class="required">Required</div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="course_number">Course number:</label> >+ </div> >+ <div class="fg-input"> > <input id="course_number" name="course_number" type="text" value="[% course_number | html %]" required="required" class="required" /> >- <span class="required">Required</span> >- </li> >+ </div> >+ <div class="required">Required</div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="section">Section:</label> >+ </div> >+ <div class="fg-input"> > <input id="section" name="section" type="text" value="[% section | html %]" /> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label class="required" for="course_name">Course name:</label> >+ </div> >+ <div class="fg-input"> > <input id="course_name" name="course_name" type="text" value="[% course_name | html %]" required="required" class="required" /> >- <span class="required">Required</span> >- </li> >+ </div> >+ <div class="required">Required</div> >+ </div> > >- <li> >- [% IF terms %] >+ <div class="fg-row"> >+ [% IF terms %] >+ <div class="fg-label"> > <label for="term">[% tp('Semester', 'Term:') | html %]</label> >+ </div> >+ <div class="fg-input"> > <select id="term" name="term"> > <option value=""></option> > >@@ -123,15 +141,22 @@ > [% END %] > [% END %] > </select> >- [% ELSE %] >+ </div> >+ [% ELSE %] >+ <div class="fg-label"> > <span class="label">[% tp('Semester', 'Term:') | html %] </span> >+ </div> >+ <div class="fg-input"> > <span id="term">No TERM authorised values found! Please create one or more authorised values with the category TERM.</span> >- [% END %] >- </li> >+ </div> >+ [% END %] >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <span class="label">Instructors:</span> >- >+ </div> >+ <div class="fg-input"> > <div id="course_instructors"> > <div id="instructors"> > [% FOREACH i IN instructors %] >@@ -146,31 +171,48 @@ > <input autocomplete="off" id="find_instructor" type="text" style="width:150px" class="noEnterSubmit" /> > </div> > <div id="find_instructor_container"></div> >- </div> </li >- ><li> >+ </div> >+ </div> >+ </div> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="staff_note">Staff note:</label> >+ </div> >+ <div class="fg-input"> > <textarea name="staff_note" id="staff_note">[% staff_note | html %]</textarea> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="public_note">Public note:</label> >+ </div> >+ <div class="fg-input"> > <textarea name="public_note" id="public_note">[% public_note | html %]</textarea> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row input-sm"> >+ <div class="fg-label"> > <label for="students_count">Number of students:</label> >- <input id="students_count" name="students_count" type="text" value="[% students_count | html %]" /> >- </li> >+ </div> >+ <div class="fg-input"> >+ <input id="students_count" name="students_count" type="text" value="[% students_count | html %]" maxlength="20" /> >+ </div> >+ </div> > >- <li> >- <label for="enabled">Enabled?</label> >+ <div class="fg-row input-checkbox"> >+ <div class="fg-label"> >+ <label for="enabled">Enabled</label> >+ </div> >+ <div class="fg-input"> > [% IF enabled == 'no' %] > <input type="checkbox" name="enabled" id="enabled" /> > [% ELSE %] > <input type="checkbox" name="enabled" id="enabled" checked="checked" /> > [% END %] >- </li> >- </ol> >+ </div> >+ </div> > </fieldset> > > <fieldset class="action"> >-- >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 42099
:
195460
|
195462