aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/views/default/forms/pages/editwelcome.php
blob: e6d1f925a52ba3718ed4e0a5d98876d98a77bd51 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
 * Welcome page edit form
 *
 * @package ElggPages
 */

//set some variables
if($vars['entity']) {
	foreach($vars['entity'] as $welcome) {
		$current_message = $welcome->description;
		$object_guid = $welcome->guid;
		$access_id = $welcome->access_id;
	}
} else {
	$current_message = '';
	$object_guid = '';
	$access_id = ACCESS_PUBLIC;
}

$page_owner = $vars['owner']->guid;

?>
<form action="<?php echo $vars['url']; ?>action/pages/editwelcome" method="post">

	<p class="longtext_inputarea">
	<label>
		<?php echo elgg_view("input/longtext",array(
			'internalname' => "pages_welcome",
			'value' => $current_message,
			'disabled' => $disabled
		)); ?>
	</label>
</p>
<p>
	<label>
		<?php echo elgg_echo('access'); ?><br />
		<?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?>
	</label>
</p>
<input type="hidden" name="owner_guid" value="<?php echo $page_owner; ?>" />

<?php
	echo elgg_view('input/securitytoken');

	//if it is editing, include the object guid
	if ($object_guid != ''){
	?>
	<input type="hidden" name="object_guid" value="<?php echo $object_guid; ?>" />
<?php
		}
	?>

<input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" />
</form>