aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/widgets/save.php4
-rw-r--r--views/default/widgets/editwrapper.php2
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() {