Commit e4b2ab62 authored by Nigel McNie's avatar Nigel McNie
Browse files

Make sure that 'new' is passed around in some other places where it is needed,...

Make sure that 'new' is passed around in some other places where it is needed, so the wizard works. Also fixed a couple of broken redirects for the non javascript version
parent ffaec8b7
......@@ -212,7 +212,9 @@ class BlockInstance {
set_field('block_instance', 'configdata', serialize($values), 'id', $this->get('id'));
$SESSION->add_ok_msg(get_string('blockinstanceconfiguredsuccessfully', 'view'));
redirect('/view/blocks.php?id=' . $this->get('view'));
$new = param_boolean('new');
$category = param_alpha('c', '');
redirect('/view/blocks.php?id=' . $this->get('view') . '&c=' . $category . '&new=' . $new);
}
/**
......
......@@ -550,7 +550,7 @@ class View {
case 'removeblockinstance': // requires action_removeblockinstance_id_\d
if (!defined('JSON')) {
if (!$sure = param_boolean('sure')) {
$yeslink = get_config('wwwroot') . '/view/blocks.php?id=1&c=file&new=' . $new . '&action_' . $action . '_' . $actionstring . '=1&sure=true';
$yeslink = get_config('wwwroot') . '/view/blocks.php?id=' . $this->get('id') . '&c=file&new=' . $new . '&action_' . $action . '_' . $actionstring . '=1&sure=true';
$baselink = '/view/blocks.php?id=' . $this->get('id') . '&c=' . $category . '&new=' . $new;
$SESSION->add_info_msg(get_string('confirmdeleteblockinstance', 'view')
. ' <a href="' . $yeslink . '">' . get_string('yes') . '</a>'
......@@ -599,7 +599,7 @@ class View {
$fun = 'add_error_msg';
}
$SESSION->{$fun}($message);
redirect('/view/blocks.php?id=' . $this->get('id') . 'c=' . $category . '&new=' . $new);
redirect('/view/blocks.php?id=' . $this->get('id') . '&c=' . $category . '&new=' . $new);
}
return array('message' => $message, 'data' => $returndata);
}
......
......@@ -5,6 +5,7 @@
<form action="" method="post">
<input type="hidden" id="viewid" name="id" value="{$view}">
<input type="hidden" name="change" value="1">
{if $new}<input type="hidden" name="new" value="1">{/if}
<div id="page">
<div id="top-pane">
<div id="category-list">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment