diff --git a/api/src/Etemplate.php b/api/src/Etemplate.php index d2c9d4a9d5..50c4805ba8 100644 --- a/api/src/Etemplate.php +++ b/api/src/Etemplate.php @@ -514,6 +514,17 @@ class Etemplate extends Etemplate\Widget\Template { $this->dom_id = $new_id; } + + /** + * Make sure there's a new request, in case of multiple Etemplates in one call. + * Normally this isn't a problem, but if you've got an etemplate in the sidebox, + * and are seeing problems submitting another etemplate, try this before executing + * the sidebox etemplate. + */ + public static function reset_request() + { + self::$request = Etemplate\Request::read(); + } /** * Get template data as array * diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php index 1db1738a00..667a456166 100644 --- a/calendar/inc/class.calendar_ui.inc.php +++ b/calendar/inc/class.calendar_ui.inc.php @@ -553,6 +553,7 @@ class calendar_ui $this->merge(); return; } + Etemplate::reset_request(); $sidebox = new Etemplate('calendar.sidebox'); $cont = $this->cal_prefs['saved_states'];