aboutsummaryrefslogtreecommitdiff
path: root/mod/embed/views/default/embed/upload/content.php
blob: b7bcc76a07ffdc8129330e677346fa6d1d0dbd08 (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
28
29
30
31
32
33
34
35
<?php
/**
 * Special upload form
 */
$upload_sections = elgg_extract('upload_sections', $vars, array());
$active_section = get_input('active_upload_section', array_shift(array_keys($upload_sections)));

$options = array();

if ($upload_sections) {
	foreach ($upload_sections as $id => $info) {
		$options[$id] = $info['name'];
	}

	$input = elgg_view('input/dropdown', array(
		'name' => 'download_section',
		'options_values' => $options,
		'id' => 'embed_upload',
		'value' => $active_section
	));

	echo "<div class='embed_modal_upload'>";
	echo "<p>" . elgg_echo('embed:upload_type') . "$input</p>";

	if (!$upload_content = elgg_view($upload_sections[$active_section]['view'])) {
		$upload_content = elgg_echo('embed:no_upload_content');
	}

	echo $upload_content . "</div>";

	elgg_load_js('elgg.embed');

} else {
	echo elgg_echo('embed:no_upload_sections');
}