aboutsummaryrefslogtreecommitdiff
path: root/mod/cool_theme/views/default/input/location.php
blob: 4cf05c72a19b4c87e66e52c8da81699554dd8de8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
 * Location input field
 *
 * @uses $vars['entity'] The ElggEntity that has a location
 * @uses $vars['value']  The default value for the location
 * @uses $vars['class']  Additional CSS class
 */

if (isset($vars['class'])) {
	$vars['class'] = "elgg-input-location {$vars['class']}";
} else {
	$vars['class'] = "elgg-input-location";
}

$defaults = array(
	'disabled' => false,
);

if (isset($vars['entity'])) {
	$defaults['value'] = $vars['entity']->location;
	unset($vars['entity']);
}

$vars = array_merge($defaults, $vars);

echo elgg_view('input/tag', $vars);