diff options
author | Sem <sembrestels@riseup.net> | 2012-07-13 07:42:36 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-07-13 07:42:36 +0200 |
commit | 1d2ce9657a44398646ed1a3980d89a1d2f50fa05 (patch) | |
tree | cbf88cc42c02b8303056eaf39fc898ccb071d245 /mod/pages/views/default/forms | |
parent | 7fd67bc8ac6882f1a73aa7f8f907cd6c2a694272 (diff) | |
download | elgg-1d2ce9657a44398646ed1a3980d89a1d2f50fa05.tar.gz elgg-1d2ce9657a44398646ed1a3980d89a1d2f50fa05.tar.bz2 |
Fixes #1334. Added dropdown to change the parent of a page.
Diffstat (limited to 'mod/pages/views/default/forms')
-rw-r--r-- | mod/pages/views/default/forms/pages/edit.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mod/pages/views/default/forms/pages/edit.php b/mod/pages/views/default/forms/pages/edit.php index 9469f5eb9..119b9ba23 100644 --- a/mod/pages/views/default/forms/pages/edit.php +++ b/mod/pages/views/default/forms/pages/edit.php @@ -18,6 +18,9 @@ foreach ($variables as $name => $type) { if (($type == 'access' || $type == 'write_access') && !$can_change_access) { continue; } + if ($name == 'parent_guid' && empty($vars['parent_guid'])) { + continue; + } ?> <div> <label><?php echo elgg_echo("pages:$name") ?></label> @@ -29,6 +32,7 @@ foreach ($variables as $name => $type) { echo elgg_view("input/$type", array( 'name' => $name, 'value' => $vars[$name], + 'entity' => ($name == 'parent_guid') ? $vars['entity'] : null, )); ?> </div> @@ -52,12 +56,6 @@ echo elgg_view('input/hidden', array( 'name' => 'container_guid', 'value' => $vars['container_guid'], )); -if ($vars['parent_guid']) { - echo elgg_view('input/hidden', array( - 'name' => 'parent_guid', - 'value' => $vars['parent_guid'], - )); -} echo elgg_view('input/submit', array('value' => elgg_echo('save'))); |