From 63762d89e5131356f86661e995bc8483c318cede Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 1 Aug 2011 15:59:33 +0000 Subject: [PATCH] * Calendar: fixed in readonly events custom fields were still editable --- calendar/inc/class.calendar_uiforms.inc.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 4746ab801c..ea693d0333 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -1382,18 +1382,10 @@ function replace_eTemplate_onsubmit() if ($view) { - foreach($event as $key => $val) - { - if ($key != 'alarm') $readonlys[$key] = true; - } - // we need to unset the tab itself, as this would make all content (incl. the change-status selects) readonly - unset($readonlys['tabs']); - // participants are handled individual - unset($readonlys['participants']); - - $readonlys['button[save]'] = $readonlys['button[apply]'] = $readonlys['freetime'] = true; - $readonlys['link_to'] = $readonlys['customfields'] = true; - $readonlys['duration'] = true; + $readonlys['__ALL__'] = true; // making everything readonly, but widgets set explicitly to false + $readonlys['alarm'] = $readonlys['button[cancel]'] = $readonlys['action'] = + $readonlys['before_after'] = $readonlys['button[add_alarm]'] = $readonlys['new_alarm[owner]'] = + $readonlys['new_alarm[days]'] = $readonlys['new_alarm[hours]'] = $readonlys['new_alarm[mins]'] = false; $content['participants']['no_add'] = true;