aboutsummaryrefslogtreecommitdiff
path: root/views/default/forms
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-02-02 16:19:37 +0100
committerKevin Jardine <kevinjardine@yahoo.com>2012-02-02 16:19:37 +0100
commite0e9ff33a7f5fc334af8127fc8680925ce967d14 (patch)
tree6384673db77ca63065fbf72cedf236ba5fb081c8 /views/default/forms
parent5aadcdd48153b4197c44bdacfc504ebd7db34c3f (diff)
downloadelgg-e0e9ff33a7f5fc334af8127fc8680925ce967d14.tar.gz
elgg-e0e9ff33a7f5fc334af8127fc8680925ce967d14.tar.bz2
added support for new personal calendar management options
Diffstat (limited to 'views/default/forms')
-rw-r--r--views/default/forms/event_calendar/edit.php30
1 files changed, 27 insertions, 3 deletions
diff --git a/views/default/forms/event_calendar/edit.php b/views/default/forms/event_calendar/edit.php
index a84a79407..1830ef168 100644
--- a/views/default/forms/event_calendar/edit.php
+++ b/views/default/forms/event_calendar/edit.php
@@ -2,6 +2,12 @@
$event = $vars['event'];
$fd = $vars['form_data'];
+$personal_manage_options = array(
+ elgg_echo('event_calendar:personal_manage:open') => 'open',
+ elgg_echo('event_calendar:personal_manage:closed') => 'closed',
+ elgg_echo('event_calendar:personal_manage:private') => 'private',
+);
+
$event_calendar_times = elgg_get_plugin_setting('times', 'event_calendar');
$event_calendar_region_display = elgg_get_plugin_setting('region_display', 'event_calendar');
$event_calendar_type_display = elgg_get_plugin_setting('type_display', 'event_calendar');
@@ -10,6 +16,7 @@ $event_calendar_spots_display = elgg_get_plugin_setting('spots_display', 'event_
$event_calendar_hide_access = elgg_get_plugin_setting('hide_access', 'event_calendar');
$event_calendar_hide_end = elgg_get_plugin_setting('hide_end', 'event_calendar');
$event_calendar_more_required = elgg_get_plugin_setting('more_required', 'event_calendar');
+$event_calendar_personal_manage = elgg_get_plugin_setting('personal_manage', 'event_calendar');
if ($event_calendar_more_required == 'yes') {
$required_fields = array('title','venue','start_date','start_time',
@@ -20,7 +27,8 @@ if ($event_calendar_more_required == 'yes') {
}
$all_fields = array('title','venue','start_time','start_date','end_time','end_date',
'brief_description','region','event_type','fees','contact','organiser','event_tags',
- 'long_description','spots');
+ 'long_description','spots','personal_manage');
+
$prefix = array();
foreach ($all_fields as $fn) {
if (in_array($fn,$required_fields)) {
@@ -64,6 +72,12 @@ if ($event) {
$start_time = $event->start_time;
$end_time = $event->end_time;
}
+ if ($event_calendar_personal_manage == 'by_event') {
+ $personal_manage = $event->personal_manage;
+ if (!$personal_manage) {
+ $personal_manage = 'open';
+ }
+ }
$event_action = 'manage_event';
$event_guid = $event->guid;
} else {
@@ -91,6 +105,9 @@ if ($event) {
$start_time = $fd['start_time'];
$end_time = $fd['end_time'];
}
+ if ($event_calendar_personal_manage == 'by_event') {
+ $personal_manage = $fd['personal_manage'];
+ }
$event_action = 'add_event';
$event_guid = 0;
}
@@ -175,7 +192,7 @@ if ($event_calendar_region_display == 'yes') {
}
}
$body .= '<p><label>'.elgg_echo("event_calendar:region_label").'<br />';
- $body .= elgg_view("input/pulldown",array('name' => 'region','value'=>$region,'options_values'=>$options));
+ $body .= elgg_view("input/dropdown",array('name' => 'region','value'=>$region,'options_values'=>$options));
$body .= '</label></p>';
$body .= '<p class="description">'.$prefix['region'].elgg_echo('event_calendar:region_description').'</p>';
}
@@ -199,7 +216,7 @@ if ($event_calendar_type_display == 'yes') {
}
}
$body .= '<p><label>'.elgg_echo("event_calendar:type_label").'<br />';
- $body .= elgg_view("input/pulldown",array('name' => 'event_type','value'=>$event_type,'options_values'=>$options));
+ $body .= elgg_view("input/dropdown",array('name' => 'event_type','value'=>$event_type,'options_values'=>$options));
$body .= '</label></p>';
$body .= '<p class="description">'.$prefix['event_type'].elgg_echo('event_calendar:type_description').'</p>';
}
@@ -220,6 +237,13 @@ $body .= elgg_view("input/text",array('name' => 'organiser','value'=>$organiser)
$body .= '</label></p>';
$body .= '<p class="description">'.$prefix['organiser'].elgg_echo('event_calendar:organiser_description').'</p>';
+if ($event_calendar_personal_manage == 'by_event') {
+ $body .= '<p><label>'.elgg_echo('event_calendar:personal_manage:label').'<br />';
+ $body .= elgg_view("input/radio",array('name' => 'personal_manage','value'=>$personal_manage,'options'=>$personal_manage_options));
+ $body .= '</label></p>';
+ $body .= '<p class="description">'.$prefix['personal_manage'].elgg_echo('event_calendar:personal_manage:description').'</p>';
+}
+
$body .= '<p><label>'.elgg_echo("event_calendar:event_tags_label").'<br />';
$body .= elgg_view("input/tags",array('name' => 'tags','value'=>$event_tags));
$body .= '</label></p>';