From 2f195b6e829dc01523ff0180f2d4663b6861b5df Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 29 Sep 2014 10:59:29 +0100 Subject: [PATCH] When mode update fails, change to this event is saved - Error handling --- .../CRM/Event/Form/ManageEvent/ConfirmRepeatMode.tpl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; + } } } }); -- 2.25.1