Bug 15501 - Planned Irregularities are deleted when modifying subscription
authorLyon3 Team <koha@univ-lyon3.fr>
Thu, 7 Jan 2016 09:48:42 +0000 (10:48 +0100)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 12 Jan 2016 15:37:26 +0000 (15:37 +0000)
Add a warning to avoid saving a subscription whitout testing prediction pattern
when there are planned no published issues

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Ran through test plan, looks all good.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt

index af908df..136aa57 100644 (file)
@@ -17,6 +17,7 @@ var globalnumpatterndata;
 var globalfreqdata;
 var advancedpatternlocked;
 var patternneedtobetested = 0;
+[% IF ( irregularity ) %]patternneedtobetested=1[% END %]
 
 function check_issues(){
     if (globalfreqdata.unit.length >0) {
@@ -86,7 +87,9 @@ function Check_page2(){
         return false;
     }
     if(patternneedtobetested){
-        alert(_("Please click on 'Test prediction pattern' before saving subscription."));
+        [% IF (irregularity) %]
+           alert(_("Warning ! Present pattern has planned irregularities. Click on 'Test prediction pattern' to check if it's still valid"));
+        [% ELSE %]alert(_("Please click on 'Test prediction pattern' before saving subscription."));[% END %]
         return false;
     }