aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--models/model.php4
-rw-r--r--views/default/forms/event_calendar/edit.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/models/model.php b/models/model.php
index cf00c4b1c..b3ba4db80 100644
--- a/models/model.php
+++ b/models/model.php
@@ -1519,11 +1519,14 @@ function event_calendar_get_page_content_edit($page_type,$guid) {
if (elgg_instanceof($event, 'object', 'event_calendar') && $event->canEdit()) {
$body_vars['event'] = $event;
$body_vars['form_data'] = event_calendar_prepare_edit_form_vars($event);
+
$event_container = get_entity($event->container_guid);
if (elgg_instanceof($event_container, 'group')) {
elgg_push_breadcrumb(elgg_echo('event_calendar:group_breadcrumb'), 'event_calendar/group/'.$event->container_guid);
+ $body_vars['group_guid'] = $event_container->guid;
} else {
elgg_push_breadcrumb(elgg_echo('event_calendar:show_events_title'),'event_calendar/list');
+ $body_vars['group_guid'] = 0;
}
elgg_push_breadcrumb($event->title,$event->getURL());
elgg_push_breadcrumb(elgg_echo('event_calendar:manage_event_title'));
@@ -1547,6 +1550,7 @@ function event_calendar_get_page_content_edit($page_type,$guid) {
$content = elgg_echo('event_calendar:no_group');
}
} else {
+ $body_vars['group_guid'] = 0;
elgg_push_breadcrumb(elgg_echo('event_calendar:show_events_title'),'event_calendar/list');
elgg_push_breadcrumb(elgg_echo('event_calendar:add_event_title'));
diff --git a/views/default/forms/event_calendar/edit.php b/views/default/forms/event_calendar/edit.php
index 79e2a5d0b..d1c7967c3 100644
--- a/views/default/forms/event_calendar/edit.php
+++ b/views/default/forms/event_calendar/edit.php
@@ -140,7 +140,7 @@ $body = '<div class="event-calendar-edit-form">';
$body .= elgg_view('input/hidden',array('name'=>'event_action', 'value'=>$event_action));
$body .= elgg_view('input/hidden',array('name'=>'event_guid', 'value'=>$event_guid));
-$body .= elgg_view('input/hidden',array('name'=>'group_guid', 'value'=>$vars['group_guid']));
+//$body .= elgg_view('input/hidden',array('name'=>'group_guid', 'value'=>$vars['group_guid']));
$body .= '<div class="event-calendar-edit-form-block event-calendar-edit-form-top-block">';
@@ -165,7 +165,7 @@ $body .= '</p>';
$body .= '<p class="event-calendar-description">'.$prefix['event_tags'].elgg_echo('event_calendar:event_tags_description').'</p>';
$body .= '<p><label>'.elgg_echo("event_calendar:calendar_label").'</label>';
-$body .= elgg_view('event_calendar/container',array('container_guid'=>$vars['container_guid']));
+$body .= elgg_view('event_calendar/container',array('container_guid'=>$vars['group_guid']));
$body .= '</p>';
$body .= '<p class="event-calendar-description">'.$prefix['calendar'].elgg_echo('event_calendar:calendar_description').'</p>';