Bugzilla – Attachment 53860 Details for
Bug 17014
Remove more event attributes from patron templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17014 - Remove more event attributes from patron templates
Bug-17014---Remove-more-event-attributes-from-patr.patch (text/plain), 13.13 KB, created by
Owen Leonard
on 2016-08-01 18:44:59 UTC
(
hide
)
Description:
Bug 17014 - Remove more event attributes from patron templates
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-08-01 18:44:59 UTC
Size:
13.13 KB
patch
obsolete
>From 281784fc2b10f38ec2c2be2c2bef1931ce24bf1f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 1 Aug 2016 12:33:24 -0400 >Subject: [PATCH] Bug 17014 - Remove more event attributes from patron > templates >Content-Type: text/plain; charset="utf-8" > >There are many patron-related templates which still use event attributes >to define events. This patch updates these templates so that events are >defined in JavaScript. > >To test apply the patch and check out to a patron. > >- From the Print menu in the toolbar, choose "Print summary." The patron > summary page should open and the print dialog should be automatically > triggered. > >- From the Print menu in the toolbar, choose "Print slip." The patron > slip page should open and the print dialog should be automatically > triggered. > >- From the Print menu in the toolbar, choose "Print quick slip." The > patron quick slip page should open and the print dialog should be > automatically triggered. > >- Click the patron's "Fines" tab in the left-hand sidebar and then > choose the "Account" tab. > -- Click the "Print" button for an account payment (the link should > point to printfeercpt.pl). A print receipt page should open and > the print dialog should be automatically triggered. > -- Follow the same procedure for a transaction which is not an account > payment (the link should point to printinvoice.pl). > >- Click the "Create manual invoice" tab. > -- Select one of the "type" choices. Doing so should automatically > populate the "Description" field with the corresponding code. > -- If necessary, define one or more values for the MANUAL_INV > authorized value and confirm that those invoice types work as well. > >- From the patron's "Pay fines" tab, click the "Pay amount" button. In > the "collect from patron" field, enter any combination of letters, > numbers, and symbols. When you tab away from that field your text > should be reformatted to currency format. > >- From the patrons home page, change the filter in the left-hand sidebar > and submit it. The correct results should be returned. >--- > .../intranet-tmpl/prog/en/includes/slip-print.inc | 6 ++--- > .../prog/en/modules/circ/printslip.tt | 2 +- > .../prog/en/modules/members/maninvoice.tt | 26 ++++++++++++---------- > .../prog/en/modules/members/member.tt | 5 ++++- > .../prog/en/modules/members/moremember-print.tt | 5 +---- > .../prog/en/modules/members/moremember-receipt.tt | 2 +- > .../prog/en/modules/members/paycollect.tt | 16 ++++++------- > .../prog/en/modules/members/printfeercpt.tt | 4 +--- > .../prog/en/modules/members/printinvoice.tt | 7 +++--- > 9 files changed, 36 insertions(+), 37 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc >index 413f4bb..689375b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc >@@ -2,9 +2,9 @@ > [% IF ( Koha.Preference('IntranetSlipPrinterJS') ) %] > [% Koha.Preference('IntranetSlipPrinterJS') %] > [% ELSE %] >- function printThenClose() { >+ $( window ).load(function() { > window.print(); > setTimeout('window.close()', 1); >- } >+ }); > [% END %] >-</script> >\ No newline at end of file >+</script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt >index 93ff49b..09b550b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt >@@ -19,7 +19,7 @@ > > [% INCLUDE 'slip-print.inc' #printThenClose %] > </head> >-<body id="circ_printslip" class="circ" onload="printThenClose();"> >+<body id="circ_printslip" class="circ"> > <div id="receipt"> > > [% IF plain %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >index 7d35c73..6cda5d1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >@@ -4,9 +4,22 @@ > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript"> > //<![CDATA[ >+ var type_fees = new Array(); >+ type_fees['L'] = ''; >+ type_fees['F'] = ''; >+ type_fees['A'] = ''; >+ type_fees['N'] = ''; >+ type_fees['M'] = ''; >+ [% FOREACH invoice_types_loo IN invoice_types_loop %] >+ type_fees['[% invoice_types_loo.authorised_value %]'] = "[% invoice_types_loo.lib %]"; >+ [% END %] > $(document).ready(function(){ > $('#maninvoice').preventDoubleFormSubmit(); > $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit"); >+ $("#invoice_type").on("change",function(){ >+ this.form.desc.value = this.options[this.selectedIndex].value; >+ this.form.amount.value = type_fees[this.options[this.selectedIndex].value]; >+ }); > }); > //]]> > </script> >@@ -44,19 +57,8 @@ $(document).ready(function(){ > <legend>Manual invoice</legend> > <ol> > <li> >-<script type="text/javascript"> >-var type_fees = new Array(); >-type_fees['L'] = ''; >-type_fees['F'] = ''; >-type_fees['A'] = ''; >-type_fees['N'] = ''; >-type_fees['M'] = ''; >-[% FOREACH invoice_types_loo IN invoice_types_loop %] >-type_fees['[% invoice_types_loo.authorised_value %]'] = "[% invoice_types_loo.lib %]"; >-[% END %] >-</script> > <label for="type">Type: </label> >- <select name="type" id="type" onchange="this.form.desc.value=this.options[this.selectedIndex].value; this.form.amount.value=type_fees[this.options[this.selectedIndex].value];"> >+ <select name="type" id="invoice_type"> > <option value="L">Lost item</option> > <option value="F">Fine</option> > <option value="A">Account management fee</option> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index 06fbc75..6365044 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -109,6 +109,9 @@ $(document).ready(function() { > e.preventDefault(); > clearFilters(true); > }); >+ $("#searchform").on("submit",function(){ >+ return filter(); >+ }); > }); > > var dtMemberResults; >@@ -418,7 +421,7 @@ function filterByFirstLetterSurname(letter) { > </div> > </div> > <div class="yui-b"> >- <form onsubmit="return filter();" id="searchform"> >+ <form method="get" id="searchform"> > <input type="hidden" id="firstletter_filter" value="" /> > <fieldset class="brief"> > <h3>Filters</h3> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >index f087760..312785d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt >@@ -4,12 +4,9 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Summary for [% firstname %] [% surname %] ([% cardnumber %])</title> > [% INCLUDE 'doc-head-close.inc' %] >- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >- <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" /> >- <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/print.css" /> > [% INCLUDE 'slip-print.inc' #printThenClose %] > </head> >-<body id="pat_moremember-print" class="pat" onload="printThenClose();"> >+<body id="pat_moremember-print" class="pat"> > <div id="main"> > <h3><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% cardnumber %]">Account summary: [% firstname %] [% surname %] ([% cardnumber %])</a></h3> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt >index 071b750..59d8b4d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt >@@ -8,7 +8,7 @@ > > [% INCLUDE 'slip-print.inc' #printThenClose %] > </head> >-<body id="pat_moremember-receipt" class="pat" onload="printThenClose();"> >+<body id="pat_moremember-receipt" class="pat"> > > <div id="receipt"> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >index bcf56ae..6cd08f4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >@@ -6,11 +6,11 @@ > //<![CDATA[ > $(document).ready(function() { > $('#payindivfine, #woindivfine, #payfine').preventDoubleFormSubmit(); >+ $("#paid").on("change",function(){ >+ moneyFormat( this ); >+ }); > }); >-//]]> >-</script> >-<script type= "text/javascript"> >-//<![CDATA[ >+ > function moneyFormat(textObj) { > var newValue = textObj.value; > var decAmount = ""; >@@ -99,7 +99,7 @@ function moneyFormat(textObj) { > [% END %] > > [% IF ( pay_individual ) %] >- <form name="payindivfine" id="payindivfine" onsubmit="return validatePayment(this);" method="post" action="/cgi-bin/koha/members/paycollect.pl"> >+ <form name="payindivfine" id="payindivfine" method="post" action="/cgi-bin/koha/members/paycollect.pl"> > <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" /> > <input type="hidden" name="pay_individual" id="pay_individual" value="[% pay_individual %]" /> > <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber %]" /> >@@ -145,7 +145,7 @@ function moneyFormat(textObj) { > <li> > <label for="paid">Collect from patron: </label> > <!-- default to paying all --> >- <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payindivfine.paid)"/> >+ <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" /> > </li> > </ol> > </fieldset> >@@ -195,7 +195,7 @@ function moneyFormat(textObj) { > </form> > [% ELSE %] > >- <form name="payfine" id="payfine" onsubmit="return validatePayment(this);" method="post" action="/cgi-bin/koha/members/paycollect.pl"> >+ <form name="payfine" id="payfine" method="post" action="/cgi-bin/koha/members/paycollect.pl"> > <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" /> > <input type="hidden" name="selected_accts" id="selected_accts" value="[% selected_accts %]" /> > <input type="hidden" name="total" id="total" value="[% total %]" /> >@@ -210,7 +210,7 @@ function moneyFormat(textObj) { > <li> > <label for="paid">Collect from patron: </label> > <!-- default to paying all --> >- <input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payfine.paid)"/> >+ <input name="paid" id="paid" value="[% total | format('%.2f') %]" /> > </li> > <li> > <label for="selected_accts_notes">Note: </label> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt >index 494e8d5..3be2765 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt >@@ -3,12 +3,10 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Print Receipt for [% cardnumber %]</title> > [% INCLUDE 'doc-head-close.inc' %] >-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >-<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" /> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/printreceiptinvoice.css" /> > [% INCLUDE 'slip-print.inc' #printThenClose %] > </head> >-<body id="pat_printfeercpt" class="pat" onload="printThenClose();"> >+<body id="pat_printfeercpt" class="pat"> > > <div id="receipt"> > <!-- The table with the account items --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt >index 50e7254..86cc32b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt >@@ -1,12 +1,11 @@ > [% USE Koha %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>Print Receipt for [% cardnumber %]</title> >-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >-<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" /> >+<title>Print receipt for [% cardnumber %]</title> >+[% INCLUDE 'doc-head-close.inc' %] > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/printreceiptinvoice.css" /> > [% INCLUDE 'slip-print.inc' #printThenClose %] > </head> >-<body id="printinvoice" class="pat" onload="printThenClose();"> >+<body id="printinvoice" class="pat"> > > <div id="receipt"> > <!-- The table with the account items --> >-- >2.1.4
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 17014
:
53860
|
61382
|
61423
|
61424