When mode update fails, change to this event is saved - Error handling
authorunknown <priyanka.karan26@gmail.com>
Mon, 29 Sep 2014 09:59:29 +0000 (10:59 +0100)
committerdeepak-srivastava <deepak.srivastava.0303@gmail.com>
Fri, 3 Oct 2014 09:08:27 +0000 (10:08 +0100)
templates/CRM/Event/Form/ManageEvent/ConfirmRepeatMode.tpl

index daa6fac1d9c24fb6042fdec41fc55ab6197e9e90..71d3116f306486a1918d618a4b66f90b3c5a29b7 100644 (file)
               $("#repeat-mode-dailog").dialog('close');
               $('#mainTabContainer div:visible Form').submit();
             }else if(result.status != "" && result.status == 'Error'){
-              $("#repeat-mode-dailog").html('').append("<span id='error-text'>Some error ocurred, please try after some time</span>").css('color', 'red');
+              var errorBox = confirm("Mode could not be updated, save only this event?");
+              if (errorBox == true) {
+                $("#repeat-mode-dailog").dialog('close');
+                $('#mainTabContainer div:visible Form').submit();
+              } else {
+                $("#repeat-mode-dailog").dialog('close');
+                return false;
+              }
             }
           }
         });