Bugzilla – Attachment 175457 Details for
Bug 38701
Fix HTML validity errors in invoice template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38701: Fix HTML validity errors in invoice template
Bug-38701-Fix-HTML-validity-errors-in-invoice-temp.patch (text/plain), 7.99 KB, created by
Owen Leonard
on 2024-12-13 16:36:45 UTC
(
hide
)
Description:
Bug 38701: Fix HTML validity errors in invoice template
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-12-13 16:36:45 UTC
Size:
7.99 KB
patch
obsolete
>From c45c935d2ca63c0995529099176bfa57df444e06 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 13 Dec 2024 16:17:18 +0000 >Subject: [PATCH] Bug 38701: Fix HTML validity errors in invoice template > >This patch makes some markup corrections to acqui/invoice.tt so that it >passes an HTML validity check. > >- Moves incorrectly placed </td> >- Change <span> to <div> and remove invalid </br> >- Correct instances of "<th class="replacementprice"/>" (th cannot be > self-closed) >- Add id attribute to inputs to correspond to existing labels >- Change "all_fund_dropdown" markup so that it validates but still works > with the active/inactive fund display. > >To test, apply the patch and go to Acquisitions -> Invoices. Perform an >invoice search which will return results. In the results click the >invoice number to view the invoice. > >- Test the "show inactive" checkbox corresponding to the "Shipping fund" > dropdown. Checking and unchecking it should work correctly to show and > hide inactive funds. >- Run the page source through https://validator.w3.org and confirm that > there are no errors coming from this template. > >Sponsored-by: Athens County Public Libraries >--- > .../prog/en/modules/acqui/invoice.tt | 48 ++++++++++--------- > 1 file changed, 25 insertions(+), 23 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >index baef5c261a..4bf835b4fe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >@@ -353,14 +353,14 @@ > </td> > <td> > <p>[% order.branchcode | html %]</p> >- [% IF has_invoice_unitprice %] >- <td> >- [% IF order.invoice_unitprice %] >- [% order.invoice_unitprice | $Price %] [% order.invoice_currency | html %] >- [% END %] >- </td> >- [% END %] > </td> >+ [% IF has_invoice_unitprice %] >+ <td> >+ [% IF order.invoice_unitprice %] >+ [% order.invoice_unitprice | $Price %] [% order.invoice_currency | html %] >+ [% END %] >+ </td> >+ [% END %] > <td class="number tax_excluded"> > [% order.unitprice_tax_excluded | $Price %] > </td> >@@ -389,7 +389,7 @@ > [% order.tax_value | $Price %] > </td> > <td> >- <span class="order_name" data-order_id="[% order.ordernumber | html %]">[% order.budget_name | html %]</span></br> >+ <div class="order_name" data-order_id="[% order.ordernumber | html %]">[% order.budget_name | html %]</div> > <a href="#" class="modify_fund" data-order_id="[% order.ordernumber | html %]" data-budget_id="[% order.budget_id | html %]" data-sort1="[% order.sort1 | html %]" data-sort2="[% order.sort2 | html %]">Modify fund</a> > </td> > </tr> >@@ -404,7 +404,7 @@ > [% END %] > <th class="tax_excluded"></th> > <th class="tax_included"></th> >- <th class="replacementprice"/> >+ <th class="replacementprice"></th> > <th>[% tf.quantity | html %]</th> > <th class="tax_excluded">[% tf.total_tax_excluded | $Price %]</th> > <th class="tax_included">[% tf.total_tax_included | $Price %]</th> >@@ -420,7 +420,7 @@ > [% END %] > <th class="tax_excluded"></th> > <th class="tax_included"></th> >- <th class="replacementprice"/> >+ <th class="replacementprice"></th> > <th>[% total_quantity | html %]</th> > <th class="tax_excluded">[% total_tax_excluded | $Price %]</th> > <th class="tax_included">[% total_tax_included | $Price %]</th> >@@ -435,7 +435,7 @@ > [% END %] > <th class="tax_excluded"></th> > <th class="tax_included"></th> >- <th class="replacementprice"/> >+ <th class="replacementprice"></th> > <th>[% total_quantity | html %]</th> > <th class="tax_excluded">[% total_tax_excluded_shipment + total_adj | $Price %]</th> > <th class="tax_included">[% total_tax_included_shipment + total_adj | $Price %]</th> >@@ -511,11 +511,11 @@ > </li> > <li> > <label for="sort1">Statistic 1: </label> >- <input type="text" name="sort1" /> >+ <input type="text" id="sort1" name="sort1" /> > </li> > <li> > <label for="sort2">Statistic 2: </label> >- <input type="text" name="sort2" /> >+ <input type="text" id="sort2" name="sort2" /> > </li> > </ol> > </fieldset> >@@ -528,16 +528,18 @@ > </div> <!-- /.modal-dialog --> > </div> <!-- /#updateFund.modal --> > >-<span style="display:none;" id="all_fund_dropdown"> >- <option value="">No fund</option> >- [% FOREACH budget IN budgets %] >- [% IF ( budget.b_active ) %] >- <option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]">[% budget.b_txt | html %]</option> >- [% ELSE %] >- <option value="[% budget.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat |html %]">[% budget.b_txt | html %] (inactive)</option> >- [% END %] >- [% END # /FOREACH budget %] >-</span> <!-- /#all_fund_dropdown --> >+<div style="display:none;"> >+ <select id="all_fund_dropdown"> >+ <option value="">No fund</option> >+ [% FOREACH budget IN budgets %] >+ [% IF ( budget.b_active ) %] >+ <option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]">[% budget.b_txt | html %]</option> >+ [% ELSE %] >+ <option value="[% budget.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat |html %]">[% budget.b_txt | html %] (inactive)</option> >+ [% END %] >+ [% END # /FOREACH budget %] >+ </select> >+</div> <!-- /#all_fund_dropdown --> > > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/acquisitions-menu.js") | $raw %] >-- >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 38701
:
175457
|
175469
|
175805