Bugzilla – Attachment 183148 Details for
Bug 40113
Update accounting admin pages to use grid layout for forms
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40113: Update accounting admin pages to use grid layout for forms
Bug-40113-Update-accounting-admin-pages-to-use-gri.patch (text/plain), 21.16 KB, created by
Owen Leonard
on 2025-06-10 18:50:59 UTC
(
hide
)
Description:
Bug 40113: Update accounting admin pages to use grid layout for forms
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-06-10 18:50:59 UTC
Size:
21.16 KB
patch
obsolete
>From 57342f0fd065af53d24a499c6bd11392cf8b0e10 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 10 Jun 2025 18:24:22 +0000 >Subject: [PATCH] Bug 40113: Update accounting admin pages to use grid layout > for forms > >This patch updates four administration templates to use new structure >and CSS for layout forms using CSS grids. > >To test, apply the patch and go to Administration. Check the following >pages, confirming that the "New" and "Edit" versions of the form look >correct in each case: > >- Administration -> Debit types >- Administration -> Credit types >- Administration -> Cash registers >- Administration -> Desks > >Sponsored-by: Athens County Public Libraries >--- > .../prog/en/modules/admin/cash_registers.tt | 53 ++++++++---- > .../prog/en/modules/admin/credit_types.tt | 78 +++++++++++------ > .../prog/en/modules/admin/debit_types.tt | 86 +++++++++++++------ > .../prog/en/modules/admin/desks.tt | 34 +++++--- > 4 files changed, 170 insertions(+), 81 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt >index 48b2b63cd1c..b081c25ea0a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt >@@ -103,27 +103,42 @@ > <form action="/cgi-bin/koha/admin/cash_registers.pl" id="Aform" name="Aform" class="validated" method="post"> > [% INCLUDE 'csrf-token.inc' %] > >- <fieldset class="rows"> >+ <fieldset class="fg"> > <input type="hidden" name="op" value="cud-add_validate" /> >- <ol> >- [% IF cash_register %] >- <li> >- <span class="label">Cash register ID: </span>[% cash_register.id | html %] >+ [% IF cash_register %] >+ <div class="fg-row"> >+ <div class="fg-label"> >+ <span class="label">Cash register ID: </span> >+ </div> >+ <div class="fg-text"> >+ [% cash_register.id | html %] > <input type="hidden" name="id" value="[% cash_register.id | html %]" /> >- </li> >- [% END %] >- <li> >+ </div> >+ </div> >+ [% END %] >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="name" class="required">Name: </label> >+ </div> >+ <div class="fg-input"> > <input type="text" name="name" id="name" size="24" maxlength="24" value="[% cash_register.name | html %]" class="required focus" /> >- <span class="required">Required</span> >- </li> >+ <div class="required">Required</div> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="description">Description: </label> >+ </div> >+ <div class="fg-input"> > <input type="text" name="description" id="description" size="24" value="[% cash_register.description | html %]" /> >- </li> >- <li> >+ </div> >+ </div> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="branch">Library: </label> >+ </div> >+ <div class="fg-input"> > <select id="branch" name="branch"> > [% IF cash_register %] > [% PROCESS options_for_libraries libraries => Branches.all( selected => cash_register.branch ) %] >@@ -131,13 +146,17 @@ > [% PROCESS options_for_libraries libraries => Branches.all() %] > [% END %] > </select> >- </li> >+ </div> >+ </div> > >- <li> >+ <div class="fg-row input-sm"> >+ <div class="fg-label"> > <label for="starting_float">Initial float: </label> >+ </div> >+ <div class="fg-input"> > <input type="text" pattern="^\d+(?:\.\d{0,2})$" name="starting_float" id="starting_float" size="24" value="[% cash_register.starting_float | $Price on_editing => 1 %]" /> >- </li> >- </ol> >+ </div> >+ </div> > </fieldset> > > <fieldset class="action"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt >index 7fb1068645d..8e1699718e5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt >@@ -85,27 +85,43 @@ > <form action="/cgi-bin/koha/admin/credit_types.pl" name="Aform" method="post" class="validated"> > [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="op" value="cud-add_validate" /> >- <fieldset class="rows"> >- <ol> >- <li> >+ <fieldset class="fg"> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="code" class="required">Credit type code: </label> >- [% IF credit_type %] >+ </div> >+ [% IF credit_type %] >+ <div class="fg-text"> > <strong>[% credit_type.code | html %]</strong> > <input type="hidden" name="code" value="[% code | html %]" /> >- [% ELSE %] >- <input type="text" name="code" id="code" size="80" maxlength="64" class="required focus" required="required" /><span class="required">Required. Maximum length is 64 letters</span> >- [% END %] >- </li> >- <li> >+ </div> >+ [% ELSE %] >+ <div class="fg-input"> >+ <input type="text" name="code" id="code" size="80" maxlength="64" class="required focus" required="required" /> >+ </div> >+ <div class="required">Required</div> >+ <div class="hint">Maximum length is 64 letters</div> >+ [% END %] >+ </div> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="description" class="required">Description: </label> >- [% IF credit_type && credit_type.is_system %] >+ </div> >+ [% IF credit_type && credit_type.is_system %] >+ <div class="fg-text"> > <span>[%- PROCESS credit_type_description credit_type = credit_type -%]</span> >- [% ELSE %] >+ </div> >+ [% ELSE %] >+ <div class="fg-input"> > <input type="text" name="description" id="description" required="required" class="required" size="80" maxlength="100" value="[% credit_type.description | html %]" /> <span class="required">Required</span> >- [% END %] >- </li> >- <li> >- <label for="can_be_added_manually">Can be manually added ? </label> >+ </div> >+ [% END %] >+ </div> >+ <div class="fg-row input-checkbox"> >+ <div class="fg-label"> >+ <label for="can_be_added_manually">Can be manually added? </label> >+ </div> >+ <div class="fg-input"> > [% IF credit_type && credit_type.is_system %] > [% IF credit_type.can_be_added_manually %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %] > [% ELSIF credit_type.can_be_added_manually %] >@@ -113,21 +129,31 @@ > [% ELSE %] > <input type="checkbox" name="can_be_added_manually" id="can_be_added_manually" value="1" /> > [% END %] >- </li> >- <li> >+ </div> >+ </div> >+ <div class="fg-row input-checkbox"> >+ <div class="fg-label"> > <label for="credit_number_enabled">Enable credit number</label> >+ </div> >+ <div class="fg-input"> > [% IF credit_type.credit_number_enabled %] > <input type="checkbox" name="credit_number_enabled" id="credit_number_enabled" checked="checked" value="1" /> > [% ELSE %] > <input type="checkbox" name="credit_number_enabled" id="credit_number_enabled" value="1" /> > [% END %] >- <span class="hint">Enable automatic generation of credit number (see <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AutoCreditNumber">AutoCreditNumber</a>)</span> >- </li> >- <li> >+ </div> >+ <div class="hint">Enable automatic generation of credit number (see <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AutoCreditNumber">AutoCreditNumber</a>)</div> >+ </div> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="library_limitation">Libraries limitation: </label> >- [% IF credit_type && credit_type.is_system %] >+ </div> >+ [% IF credit_type && credit_type.is_system %] >+ <div class="fg-text"> > <span>No library limitation</span> >- [% ELSE %] >+ </div> >+ [% ELSE %] >+ <div class="fg-input"> > <select id="library_limitation" name="branches" multiple size="10"> > [% FOREACH branch IN branches_loop %] > [% IF ( branch.selected ) %] >@@ -137,10 +163,10 @@ > [% END %] > [% END %] > </select> >- <div class="hint">Limit the use of this credit type to the selected libraries.</div> >- [% END %] >- </li> >- </ol> >+ </div> >+ <div class="hint">Limit the use of this credit type to the selected libraries.</div> >+ [% END %] >+ </div> > </fieldset> > [% IF additional_fields.size %] > [% INCLUDE 'additional-fields-entry.inc' available=additional_fields values=additional_field_values wrap_fieldset=1 %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt >index 018bd5c6654..393d3a231f0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt >@@ -83,57 +83,89 @@ > <form action="/cgi-bin/koha/admin/debit_types.pl" name="Aform" method="post" class="validated"> > [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="op" value="cud-add_validate" /> >- <fieldset class="rows"> >- <ol> >- <li> >+ <fieldset class="fg"> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="code" class="required">Debit type code: </label> >- [% IF debit_type %] >+ </div> >+ [% IF debit_type %] >+ <div class="fg-text"> > <strong>[% debit_type.code | html %]</strong> > <input type="hidden" name="code" value="[% code | html %]" /> >- [% ELSE %] >- <input type="text" name="code" id="code" size="80" maxlength="64" class="required focus" required="required" /><span class="required">Required. Maximum length is 64 letters</span> >- [% END %] >- </li> >- <li> >+ </div> >+ [% ELSE %] >+ <div class="fg-input"> >+ <input type="text" name="code" id="code" size="80" maxlength="64" class="required focus" required="required" /> >+ </div> >+ <div class="required">Required</div> >+ <div class="hint">Maximum length is 64 letters</div> >+ [% END %] >+ </div> >+ <div class="fg-row input-sm"> >+ <div class="fg-label"> > <label for="default_amount">Default amount: </label> >+ </div> >+ <div class="fg-input"> > <input type="text" pattern="^\d+(\.\d{2})?$" name="default_amount" id="default_amount" size="80" maxlength="100" value="[% debit_type.default_amount | $Price on_editing => 1 %]" step="any" min="0" /> >- </li> >- <li> >+ </div> >+ </div> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="description" class="required">Description: </label> >- [% IF debit_type && debit_type.is_system %] >+ </div> >+ [% IF debit_type && debit_type.is_system %] >+ <div class="fg-text"> > <span>[%- PROCESS debit_type_description debit_type = debit_type -%]</span> >- [% ELSE %] >- <input type="text" name="description" id="description" required="required" class="required" size="80" maxlength="100" value="[% debit_type.description | html %]" /> <span class="required">Required</span> >- [% END %] >- </li> >- <li> >+ </div> >+ [% ELSE %] >+ <div class="fg-input"> >+ <input type="text" name="description" id="description" required="required" class="required" size="80" maxlength="100" value="[% debit_type.description | html %]" /> >+ </div> >+ <div class="required">Required</div> >+ [% END %] >+ </div> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="can_be_invoiced">Can be manually invoiced? </label> >+ </div> >+ <div class="fg-input"> > [% IF debit_type.can_be_invoiced %] > <input type="checkbox" name="can_be_invoiced" id="can_be_invoiced" checked="checked" value="1" /> > [% ELSE %] > <input type="checkbox" name="can_be_invoiced" id="can_be_invoiced" value="1" /> > [% END %] >- </li> >- <li> >+ </div> >+ </div> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="can_be_sold">Can be sold? </label> >+ </div> >+ <div class="fg-input"> > [% IF debit_type.can_be_sold %] > <input type="checkbox" name="can_be_sold" id="can_be_sold" checked="checked" value="1" /> > [% ELSE %] > <input type="checkbox" name="can_be_sold" id="can_be_sold" value="1" /> > [% END %] >- </li> >- <li> >+ </div> >+ </div> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="restricts_checkouts">Included in noissuescharge? </label> >+ </div> >+ <div class="fg-input"> > [% IF debit_type.restricts_checkouts %] > <input type="checkbox" name="restricts_checkouts" id="restricts_checkouts" checked="checked" value="1" /> > [% ELSE %] > <input type="checkbox" name="restricts_checkouts" id="restricts_checkouts" value="1" /> > [% END %] >- </li> >- <li> >+ </div> >+ </div> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="library_limitation">Libraries limitation: </label> >+ </div> >+ <div class="fg-input"> > <select id="library_limitation" name="branches" multiple size="10"> >- <option value="">All libraries</option> > [% FOREACH branch IN branches_loop %] > [% IF ( branch.selected ) %] > <option selected="selected" value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> >@@ -142,9 +174,9 @@ > [% END %] > [% END %] > </select> >- <div class="hint">Limit use of this debit type to the selected libraries.</div> >- </li> >- </ol> >+ </div> >+ <div class="hint">Limit use of this debit type to the selected libraries.</div> >+ </div> > </fieldset> > [% IF additional_fields.size %] > [% INCLUDE 'additional-fields-entry.inc' available=additional_fields values=additional_field_values wrap_fieldset=1 %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/desks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/desks.tt >index 13a9c1c8bdf..4be7dd27428 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/desks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/desks.tt >@@ -101,17 +101,29 @@ > <input type="hidden" name="op" value="cud-add_validate" /> > <input type="hidden" name="desk_id" value="[% desk.desk_id | html %]" /> > >- <fieldset class="rows"> >- <ol> >- [% IF desk %] >- <li><span class="label">Desk ID: </span>[% desk.desk_id | html %]</li> >- [% END %] >- <li> >+ <fieldset class="fg"> >+ [% IF desk %] >+ <div class="fg-row"> >+ <div class="fg-label"> >+ <span class="label">Desk ID: </span> >+ </div> >+ <div class="fg-text"> [% desk.desk_id | html %] </div> >+ </div> >+ [% END %] >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="desk_name" class="required">Desk: </label> >- <input type="text" name="desk_name" id="desk_name" size="80" maxlength="100" value="[% desk.desk_name | html %]" required="required" class="required" /> <span class="required">Required</span> >- </li> >- <li> >+ </div> >+ <div class="fg-input"> >+ <input type="text" name="desk_name" id="desk_name" size="80" maxlength="100" value="[% desk.desk_name | html %]" required="required" class="required" /> >+ </div> >+ <div class="required">Required</div> >+ </div> >+ <div class="fg-row"> >+ <div class="fg-label"> > <label for="branchcode" class="required">Library: </label> >+ </div> >+ <div class="fg-input"> > <select id="branchcode" name="branchcode" required="required"> > <option value=""></option> > [% IF desk %] >@@ -120,8 +132,8 @@ > [% PROCESS options_for_libraries libraries => Branches.all() %] > [% END %] > </select> >- </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 40113
: 183148