From b43d13eca7331e81f108202ffe7a2dacd237bb0f Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 11 Aug 2008 13:50:33 +0000 Subject: Refs #210 & #211 : Widgets edit now using action_gatekeeper git-svn-id: https://code.elgg.org/elgg/trunk@1827 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/widgets/save.php | 3 ++- 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 .= "

"; + $form_body .= "

" . 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'))) . "

"; + + echo elgg_view('input/form', array('internalid' => "widgetform$guid", 'body' => $form_body, 'action' => "{$vars['url']}action/widgets/save")) ?> -
- - - -

- -

-

- - - -

- -