bug 1570: return to same tab if cancelling preference edit

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Galen Charlton 2007-12-02 13:41:41 -06:00 committed by Joshua Ferraro
parent af4c92e113
commit 1077ff6b08
2 changed files with 9 additions and 1 deletions

View File

@ -361,6 +361,8 @@ if ($op eq 'add_form') {
$data=$sth->fetchrow_hashref;
$sth->finish;
$template->param(modify => 1);
# save tab to return to if user cancels edit
$template->param(return_tab => $tabsysprefs{$searchfield});
}
my @options;

View File

@ -116,7 +116,13 @@
<input type="radio" name="value" id="value-no" value="0" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" id="value-no" value="0" /><!-- /TMPL_IF --> <label for="value-no" class="yesno">OFF</label><!-- /TMPL_IF -->
</li>
</ol></fieldset>
<fieldset class="action"><input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl">Cancel</a></fieldset>
<fieldset class="action"><input type="submit" value="Save" />
<!-- TMPL_IF name="return_tab" -->
<a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl?tab=<!-- TMPL_VAR name="return_tab" -->">Cancel</a>
<!-- TMPL_ELSE -->
<a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl">Cancel</a>
<!-- /TMPL_IF -->
</fieldset>
<fieldset class="brief">
<legend>Koha internal</legend>