Bugzilla – Attachment 2611 Details for
Bug 5051
Renewal due date doesn't always show on patron Checkout tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-5051-Renewal-due-date-doesn-t-always-sho.patch (text/plain), 8.16 KB, created by
Owen Leonard
on 2010-09-09 16:03:15 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-09-09 16:03:15 UTC
Size:
8.16 KB
patch
obsolete
>From a45d0706ab03ff3d55e8e9d5e05eb2a047a02aca Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 9 Sep 2010 11:58:37 -0400 >Subject: [PATCH] Fix for Bug 5051, Renewal due date doesn't always show on patron Checkout tab > >Display of the renewal date footer in the template was conditional upon >the existence of checkouts from today. > >In order to fix this bug it was necessary to repeat the markup for the >table footer twice in the template, so I created an include file for it. >The same include file can now be used in moremember.tmpl. >--- > .../prog/en/includes/checkouts-table-footer.inc | 25 ++++++++++++++ > .../prog/en/modules/circ/circulation.tmpl | 36 ++----------------- > .../prog/en/modules/members/moremember.tmpl | 36 +++++--------------- > 3 files changed, 38 insertions(+), 59 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >new file mode 100644 >index 0000000..5d05b94 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >@@ -0,0 +1,25 @@ >+<tfoot> >+ <tr> >+ <td colspan="5" style="text-align: right; font-weight:bold;">Totals:</td> >+ <td><!-- TMPL_VAR NAME="totaldue" --></td> >+ <td><!-- TMPL_VAR NAME="totalprice" --></td> >+ <td colspan="2"> >+ <p>Renewal due date: <input type="text" size="8" id="newduedate" name="newduedate" value="<!-- TMPL_VAR Name="newduedate" -->" /> >+ <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" /> >+ <script type="text/javascript"> //<![CDATA[ >+ //#TODO - ADD syspref (AllowPostDatedCheckouts). >+ Calendar.setup( >+ { >+ inputField : "newduedate", >+ ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->", >+ button : "newduedate_button", >+ disableFunc : validate1, >+ dateStatusFunc : validate1, >+ } >+ ); >+ //]]> >+ </script></p> >+ <p><label>Forgive fines on return: <input type="checkbox" name="exemptfine" value="1" /></label></p> >+ </td> >+ </tr> >+</tfoot> >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl >index 980d195..321858d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl >@@ -176,7 +176,7 @@ function refocus(calendar) { > </li> > <!-- TMPL_IF NAME="canned_bor_notes_loop" --> > <li> >- <label for="canned_notes">Predefined notes: </label> >+ <label for="type">Predefined notes: </label> > <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;"> > <option value="">Select Note</option> > <!-- TMPL_LOOP NAME="canned_bor_notes_loop" --> >@@ -193,7 +193,7 @@ function refocus(calendar) { > <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a> > </fieldset> > >- <input type="hidden" name="borrowernumber" id="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /> >+ <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /> > <input type="hidden" name="branchcode" value="<!-- TMPL_VAR NAME="branch" -->" /> > </fieldset> > </form> >@@ -642,36 +642,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> > <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th> > </tr> > <!-- TMPL_IF NAME="todayissues" --></thead> >-<tfoot> >- <tr> >- <td colspan="5" style="text-align: right; font-weight:bold;">Totals:</td> >- <td><!-- TMPL_VAR NAME="totaldue" --></td> >- <td><!-- TMPL_VAR NAME="totalprice" --></td> >- <td colspan="2"> >- <p> >- Renewal due date: <input type="text" size="8" id="newduedate" name="newduedate" value="<!-- TMPL_VAR Name="newduedate" -->" /> >- <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" /> >- <script type="text/javascript"> //<![CDATA[ >- //#TODO - ADD syspref (AllowPostDatedCheckouts). >- Calendar.setup( >- { >- inputField : "newduedate", >- ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->", >- button : "newduedate_button", >- disableFunc : validate1, >- dateStatusFunc : validate1, >- onClose : refocus >- } >- ); >- //]]> >- </script> >- </p> >- <p> >- <label>Forgive fines on return: <input type="checkbox" name="exemptfine" value="1" /></label> >- </p> >- </td> >- </tr> >- </tfoot> >+<!-- TMPL_INCLUDE NAME="checkouts-table-footer.inc" --> > <tbody> > > <!-- TMPL_LOOP NAME="todayissues" --> >@@ -734,6 +705,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> > <!-- TMPL_IF NAME="previssues" --> > <!-- TMPL_IF NAME="todayissues" --><tr><th colspan="10"><a name="previous" id="previous"></a>Previous checkouts</th></tr><!-- TMPL_ELSE --> > <tr><th class="{sorter: false}" colspan="10"><a name="previous" id="previous"></a>Previous checkouts</th></tr></thead> >+<!-- TMPL_INCLUDE NAME="checkouts-table-footer.inc" --> > <tbody> > <!-- /TMPL_IF --> > <!-- TMPL_LOOP NAME="previssues" --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl >index dfad6ee..2c02095 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl >@@ -89,7 +89,14 @@ if (nodename =="barcodes[]"){ > } > } > } >- >+function validate1(date) { >+ var today = new Date(); >+ if ( date < today ) { >+ return true; >+ } else { >+ return false; >+ } >+}; > //]]> > </script> > >@@ -404,32 +411,7 @@ if (nodename =="barcodes[]"){ > <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllitems">select all</a> | <a href="#" id="CheckNoitems">none</a></p></th> > <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th> > </tr></thead> >- <tfoot> >- <tr> >- <td colspan="5" style="text-align: right; font-weight:bold;">Totals:</td> >- <td><!-- TMPL_VAR NAME="totaldue" --></td> >- <td><!-- TMPL_VAR NAME="totalprice" --></td> >- <td colspan="2"> >- <p> >- Renewal due date: <input type="text" size="8" id="newduedate" name="newduedate" value="<!-- TMPL_VAR Name="newduedate" -->" /> >- <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" /> >- <script type="text/javascript"> >- //<![CDATA[ >- Calendar.setup({ >- inputField : "newduedate", >- ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->", >- button : "newduedate_button" >- }); >- //]]> >- </script> >- <span style="display:block;color:#666;font-weight:normal;font-size:90%;"><!-- TMPL_INCLUDE NAME="date-format.inc" --></span> >- </p> >- <p> >- <label>Forgive fines on return: <input type="checkbox" name="exemptfine" value="1" /></label> >- </p> >- </td> >- </tr> >- </tfoot> >+ <!-- TMPL_INCLUDE NAME="checkouts-table-footer.inc" --> > <tbody> > <!-- TMPL_LOOP name="issueloop" --> > >-- >1.7.0.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 5051
:
2402
|
2403
| 2611