aboutsummaryrefslogtreecommitdiff
path: root/mod/event_calendar/views/default/event_calendar/region_select.php
blob: a987171a2c65b7d5fb74f46e14e2d3de968d53dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php

$region_list = trim(elgg_get_plugin_setting('region_list', 'event_calendar'));
// make sure that we are using Unix line endings
$region_list = str_replace("\r\n","\n",$region_list);
$region_list = str_replace("\r","\n",$region_list);
if ($region_list) {
	$body = '';
	$options_values = array('-' =>elgg_echo('event_calendar:all'));
	foreach(explode("\n",$region_list) as $region_item) {
		$region_item = trim($region_item);
		$options_values[$region_item] = $region_item;
	}
	
	$body .= elgg_echo('event_calendar:region_filter_by_label');
	$body .= elgg_view('input/hidden',array('id'=>'event-calendar-region-url-start','value'=>$vars['url_start']));
	$body .= elgg_view("input/dropdown",array('id' => 'event-calendar-region','value'=>$vars['region'],'options_values'=>$options_values));
	$body .= '<br />';
}

echo $body;