diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-13 23:10:18 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-13 23:10:18 +0000 |
commit | 0b3724c9b87f891b48c41ad61c1caf3486cc0799 (patch) | |
tree | 7bd117e0256e1857da935533eb064213bc890a39 /mod/externalpages/views/default/forms/expages/edit.php | |
parent | 26f9c39ae33bc01b0f8c62b4e27f7ee077d0fadc (diff) | |
download | elgg-0b3724c9b87f891b48c41ad61c1caf3486cc0799.tar.gz elgg-0b3724c9b87f891b48c41ad61c1caf3486cc0799.tar.bz2 |
updates externalpages to 1.8
git-svn-id: http://code.elgg.org/elgg/trunk@8209 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/externalpages/views/default/forms/expages/edit.php')
-rw-r--r-- | mod/externalpages/views/default/forms/expages/edit.php | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/mod/externalpages/views/default/forms/expages/edit.php b/mod/externalpages/views/default/forms/expages/edit.php new file mode 100644 index 000000000..afe091337 --- /dev/null +++ b/mod/externalpages/views/default/forms/expages/edit.php @@ -0,0 +1,55 @@ +<?php +/** + * Edit form body for external pages + * + * @uses $vars['type'] + * + */ + +$type = $vars['type']; + +//grab the required entity +$page_contents = elgg_get_entities(array( + 'type' => 'object', + 'subtype' => $type, + 'limit' => 1, +)); + +if ($page_contents) { + $description = $page_contents[0]->description; + $guid = $page_contents[0]->guid; +} else { + $description = ""; + $guid = 0; +} + +// set the required form variables +$input_area = elgg_view('input/longtext', array( + 'internalname' => 'expagescontent', + 'value' => $description, +)); +$submit_input = elgg_view('input/submit', array( + 'internalname' => 'submit', + 'value' => elgg_echo('save'), +)); +$hidden_type = elgg_view('input/hidden', array( + 'internalname' => 'content_type', + 'value' => $type, +)); +$hidden_guid = elgg_view('input/hidden', array( + 'internalname' => 'guid', + 'value' => $guid, +)); + +$external_page_title = elgg_echo("expages:$type"); + +//construct the form +echo <<<EOT +<h3 class="mvm">$external_page_title</h3> +<div>$input_area</div> + $hidden_value + $hidden_type + $submit_input + +EOT; + |