diff options
-rw-r--r-- | actions/widgets/save.php | 3 | ||||
-rw-r--r-- | views/default/widgets/editwrapper.php | 33 |
2 files changed, 9 insertions, 27 deletions
diff --git a/actions/widgets/save.php b/actions/widgets/save.php index 40d62c735..fce221672 100644 --- a/actions/widgets/save.php +++ b/actions/widgets/save.php @@ -11,7 +11,8 @@ * @link http://elgg.org/
*/
-
+ action_gatekeeper(); +
$guid = get_input('guid');
$params = $_REQUEST['params'];
$pageurl = get_input('pageurl');
diff --git a/views/default/widgets/editwrapper.php b/views/default/widgets/editwrapper.php index 058d19a61..bde4da474 100644 --- a/views/default/widgets/editwrapper.php +++ b/views/default/widgets/editwrapper.php @@ -12,34 +12,15 @@ */
$guid = $vars['entity']->getGUID();
-
+ + + $form_body = $vars['body']; + $form_body .= "<p><label>" . elgg_echo('access') . ": " . elgg_view('input/access', array('internalname' => 'params[access_id]','value' => $vars['entity']->access_id)) . "</label></p>"; + $form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $guid)) . elgg_view('input/hidden', array('internalname' => 'noforward', 'value' => 'true')) . elgg_view('input/submit', array('internalname' => "submit$guid", 'value' => elgg_echo('save'))) . "</p>";
+ + echo elgg_view('input/form', array('internalid' => "widgetform$guid", 'body' => $form_body, 'action' => "{$vars['url']}action/widgets/save")) ?>
-<form id="widgetform<?php echo $guid; ?>" action="<?php echo $vars['url']; ?>action/widgets/save" method="post">
-
- <?php
-
- echo $vars['body'];
-
- ?>
-
- <p>
- <label>
- <?php echo elgg_echo('access'); ?>:
- <?php echo elgg_view('input/access', array('internalname' => 'params[access_id]','value' => $vars['entity']->access_id)); ?>
- </label>
- </p>
- <p>
- <input type="hidden" name="guid" value="<?php echo $guid; ?>" />
- <input type="hidden" name="noforward" value="true" />
- <input type="submit" id="submit<?php echo $guid; ?>" value="<?php
-
- echo elgg_echo('save');
-
- ?>" />
- </p>
-
-</form>
<script type="text/javascript">
$(document).ready(function() {
|