Bugzilla – Attachment 62795 Details for
Bug 3311
Statistical reports should error if row and column aren't selected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 3311 [Follow-up] Statistical reports should error if row and column aren't selected
SIGNED-OFF-Bug-3311-Follow-up-Statistical-reports-.patch (text/plain), 2.80 KB, created by
Mark Tompsett
on 2017-04-27 18:39:02 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 3311 [Follow-up] Statistical reports should error if row and column aren't selected
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-04-27 18:39:02 UTC
Size:
2.80 KB
patch
obsolete
>From 1bbd09f0a0a301d0144e3e0178fdacffbec6e34f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 27 Apr 2017 13:24:06 +0000 >Subject: [PATCH] [SIGNED OFF] Bug 3311 [Follow-up] Statistical reports should > error if row and column aren't selected > >This patch moves the validation JavaScript from the body of the page to >the <head>. The "validated" class is removed from the form so that there >is not a conflict between default error handling and the custom >validation added to the page. > >To test, apply the patch and verify that form validation still enforces >a selection of both row and column and that the error messages display >in the table header. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > .../prog/en/modules/reports/catalogue_stats.tt | 29 ++++++++++------------ > 1 file changed, 13 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >index b48d9d5..00a3472 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >@@ -36,6 +36,18 @@ > changeRemovedDateTrStatus(); > }); > changeRemovedDateTrStatus(); >+ >+ $("#configure_report").validate({ >+ errorPlacement: function(error, element) { >+ if (element.attr("name") == "Line") { >+ $("#LineError").html( error ); >+ } else if (element.attr("name") == "Column") { >+ $("#ColumnError").html( error ); >+ } else { >+ error.insertAfter(element); >+ } >+ } >+ }); > }); > //]]> > </script> >@@ -99,7 +111,7 @@ > [% END %] > [% ELSE %] > >- <form name="configure_report" id="configure_report" method="post" class="validated" action="/cgi-bin/koha/reports/catalogue_stats.pl"> >+ <form name="configure_report" id="configure_report" method="post" action="/cgi-bin/koha/reports/catalogue_stats.pl"> > <fieldset class="rows"> > <legend>Catalog statistics</legend> > <table> >@@ -277,21 +289,6 @@ > <input type="text" name="Filter" id="deldateTo" class="datepicker"/> > </td> > </tr> >-<script type="text/javascript"> >-//<![CDATA[ >- $("#configure_report").validate({ >- errorPlacement: function(error, element) { >- if (element.attr("name") == "Line") { >- $("#LineError").html( error ); >- } else if (element.attr("name") == "Column") { >- $("#ColumnError").html( error ); >- } else { >- error.insertAfter(element); >- } >- } >- }); >-//]]> >-</script> > </tbody> > </table><br /></fieldset> > >-- >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 3311
:
52775
|
52776
|
52777
|
52778
|
52779
|
53194
|
53195
|
53291
|
62533
|
62541
|
62623
|
62624
|
62630
|
62658
|
62659
|
62776
|
62777
|
62793
|
62794
| 62795 |
62796
|
62797
|
62798
|
62799
|
62800
|
62801
|
62802