diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-24 11:15:03 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-24 11:15:03 +0000 |
commit | 2f9c09fe8e99d52b8ce565da71ba47ae483c1713 (patch) | |
tree | 8c12a486498e4465715965df984281befd6c1b4d | |
parent | 118e59fa7a8980356cd326bef558afb7902af1be (diff) | |
download | elgg-2f9c09fe8e99d52b8ce565da71ba47ae483c1713.tar.gz elgg-2f9c09fe8e99d52b8ce565da71ba47ae483c1713.tar.bz2 |
Save widget improvements.
git-svn-id: https://code.elgg.org/elgg/trunk@1094 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | actions/widgets/save.php | 4 | ||||
-rw-r--r-- | views/default/widgets/editwrapper.php | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/actions/widgets/save.php b/actions/widgets/save.php index deb4bb911..5032f8a0e 100644 --- a/actions/widgets/save.php +++ b/actions/widgets/save.php @@ -15,6 +15,7 @@ $guid = get_input('guid');
$params = $_REQUEST['params'];
$pageurl = get_input('pageurl');
+ $noforward = get_input('noforward',false);
$result = false;
@@ -30,6 +31,7 @@ system_message(elgg_echo('widgets:save:failure'));
}
- forward($_SERVER['HTTP_REFERER']);
+ if (!$noforward)
+ forward($_SERVER['HTTP_REFERER']);
?>
\ No newline at end of file diff --git a/views/default/widgets/editwrapper.php b/views/default/widgets/editwrapper.php index bc7d497d9..17be9480e 100644 --- a/views/default/widgets/editwrapper.php +++ b/views/default/widgets/editwrapper.php @@ -31,6 +31,7 @@ </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');
@@ -48,6 +49,7 @@ $(document).ready(function() { $("#submit<?php echo $guid; ?>").attr("disabled","disabled");
$("#submit<?php echo $guid; ?>").attr("value","<?php echo elgg_echo("saving"); ?>");
$("#widgetcontent<?php echo $guid; ?>").html('<?php echo elgg_view('ajax/loader',array('slashes' => true)); ?>');
+ $("#widget<?php echo $guid; ?>").add(".toggle_box_edit_panel").click();
var variables = $("#widgetform<?php echo $guid; ?>").serialize();
$.post($("#widgetform<?php echo $guid; ?>").attr("action"),variables,function() {
|