From: unknown Date: Mon, 29 Sep 2014 09:59:29 +0000 (+0100) Subject: When mode update fails, change to this event is saved - Error handling X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2f195b6e829dc01523ff0180f2d4663b6861b5df;p=civicrm-core.git When mode update fails, change to this event is saved - Error handling --- diff --git a/templates/CRM/Event/Form/ManageEvent/ConfirmRepeatMode.tpl b/templates/CRM/Event/Form/ManageEvent/ConfirmRepeatMode.tpl index daa6fac1d9..71d3116f30 100644 --- a/templates/CRM/Event/Form/ManageEvent/ConfirmRepeatMode.tpl +++ b/templates/CRM/Event/Form/ManageEvent/ConfirmRepeatMode.tpl @@ -121,7 +121,14 @@ $("#repeat-mode-dailog").dialog('close'); $('#mainTabContainer div:visible Form').submit(); }else if(result.status != "" && result.status == 'Error'){ - $("#repeat-mode-dailog").html('').append("Some error ocurred, please try after some time").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; + } } } });