diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-06 11:37:17 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-06 11:37:17 +0000 |
commit | e2681159faf655aeda38d3c1832bc8674d9cdd33 (patch) | |
tree | 54720dd74c221cd0f7904c8f06ec44f9ca9a4cf5 | |
parent | c0eb72036e707f9a608e8c4c6c35364d7ee561a2 (diff) | |
download | elgg-e2681159faf655aeda38d3c1832bc8674d9cdd33.tar.gz elgg-e2681159faf655aeda38d3c1832bc8674d9cdd33.tar.bz2 |
Example of usage (Refs #210), also refs #211.
git-svn-id: https://code.elgg.org/elgg/trunk@1733 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | actions/import/opendd.php | 1 | ||||
-rw-r--r-- | mod/guidtool/views/default/forms/guidtool/import.php | 13 |
2 files changed, 9 insertions, 5 deletions
diff --git a/actions/import/opendd.php b/actions/import/opendd.php index 050d49844..103069eb2 100644 --- a/actions/import/opendd.php +++ b/actions/import/opendd.php @@ -15,6 +15,7 @@ // Safety admin_gatekeeper(); + action_gatekeeper(); // Get input $data = get_input('data', '', false); diff --git a/mod/guidtool/views/default/forms/guidtool/import.php b/mod/guidtool/views/default/forms/guidtool/import.php index a2ee30406..872eba8cc 100644 --- a/mod/guidtool/views/default/forms/guidtool/import.php +++ b/mod/guidtool/views/default/forms/guidtool/import.php @@ -13,11 +13,14 @@ $format = $vars['format']; if (!$format) $format = 'opendd'; + + + $formbody = "<p>" . sprintf(elgg_echo('guidtool:import:desc'), $format) . "</p>" . + elgg_view('input/longtext', array('internalname' => 'data')) . elgg_view('input/submit', array('value' => elgg_echo("save"))); ?> <div> -<form action="<?php echo $CONFIG->url; ?>action/import/<?php echo $format; ?>" method="post"> - <p><?php echo sprintf(elgg_echo('guidtool:import:desc'), $format); ?></p> - <?php echo elgg_view('input/longtext', array('internalname' => 'data')); ?> - <input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" /> -</form> +<?php + echo elgg_view('input/form', array('body' => $formbody, 'action' => "{$CONFIG->url}action/import/$format")) +?> + </div>
\ No newline at end of file |