$e->authtoken, undef, \@vals
)->gather(1); # LFW XXX test for failure
$url = 'https://' . $self->apache->hostname . $self->ctx->{opac_root} . '/myopac/holds';
+ foreach my $param (('loc', 'qtype', 'query')) {
+ if ($self->cgi->param($param)) {
+ $url .= ";$param=" . uri_escape($self->cgi->param($param));
+ }
+ }
}
$circ->kill_me;
my $url = $self->ctx->{opac_root} . '/myopac/lists?id=' .
$bookbag->id;
- # Keep it if we've got it
- if ($self->cgi->param("sort")) {
- $url .= ";sort=" . $self->cgi->param("sort");
+ foreach my $param (('loc', 'qtype', 'query', 'sort')) {
+ if ($self->cgi->param($param)) {
+ $url .= ";$param=" . uri_escape($self->cgi->param($param));
+ }
}
return $self->generic_redirect($url);
my $url = "https://" . $self->apache->hostname .
$self->ctx->{opac_root} . "/myopac/lists?";
- $url .= 'sort=' . uri_escape($cgi->param("sort")) if $cgi->param("sort");
+ foreach my $param (('loc', 'qtype', 'query', 'sort')) {
+ if ($cgi->param($param)) {
+ $url .= "$param=" . uri_escape($cgi->param($param)) . ";";
+ }
+ }
if ($action eq 'create') {
$list = Fieldmapper::container::biblio_record_entry_bucket->new;
my $url = $self->ctx->{opac_root} . '/place_hold?hold_type=T';
$url .= ';hold_target=' . $_ for @hold_recs;
+ foreach my $param (('loc', 'qtype', 'query')) {
+ if ($cgi->param($param)) {
+ $url .= ";$param=" . uri_escape($cgi->param($param));
+ }
+ }
return $self->generic_redirect($url);
} else {
<label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
</td>
<td>
+ [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
<input id="list_create_name" type="text" name="name" />
<input type="hidden" name="action" value="create" />
</td>
<h2 class="bookbag-name"><a title="[% ltitle %]" href="[% url %]">[% bbag.name | html %]</a></h2>
[% IF bbag.description %]<div class="bookbag-description">[% bbag.description | html %]</div>[% END %]
</div>
- <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
+ <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
<div class="bookbag-share">
<input type="hidden" name="list" value="[% bbag.id %]" />
+ [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
[% IF bbag.pub != 't' %]
<input type="hidden" name="action" value="show" />
<input class="fixed" type="submit" value="[% l('Share') %]" />
[% END %]
</div>
</form>
- <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
+ <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
<div class="bookbag-controls">
<input type="hidden" name="list" value="[% bbag.id %]" />
<input type="hidden" name="action" value="delete" />
+ [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
<input type="submit" value="[% l('Delete List') %]" />
</div>
</form>
- <form action="[% ctx.opac_root %]/myopac/list/print" method="POST">
+ <form action="[% mkurl(ctx.opac_root _ '/myopac/list/print') %]" method="POST">
<div class="bookbag-controls">
<input type="hidden" name="list" value="[% bbag.id %]" />
<input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
+ [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
<input type="submit" value="[% l('Download CSV') %]" />
</div>
</form>
<div class="sort">
<form method="GET">
<label for="opac.result.sort">[% l("Sort list items by: ") %]</label>
+ [%- INCLUDE "opac/parts/preserve_params.tt2" params=['loc', 'query', 'qtype']; %]
[% INCLUDE "opac/parts/filtersort.tt2"
value=CGI.param('sort') mode='bookbag' %]
<input type="hidden" name="id"
<form method="POST">
<input type="hidden" name="id" value="[% bbag.id %]" />
<input type="hidden" name="action" value="editmeta" />
- <input type="hidden" name="sort" value="[% CGI.param('sort') | html %]" />
+ [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
<table id="bbag-name-desc-form">
<tr>
<th>
</div>
</div>
<br class="clear-both" />
- <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
+ <form action="[% mkurl(ctx.opac_root _ '/myopac/list/update') %]" method="POST">
<input type="hidden" name="list" value="[% bbag.id %]" />
<input type="hidden" name="sort" value="[% CGI.param('sort') | uri %]" />
<table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
<option value="place_hold">[% l('Place hold') %]</option>
<option value="del_item">[% l('Remove from list') %]</option>
</select>
+ [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
<input type="submit" value="[% l('Go') %]" />
</td>
</tr>
<tr>
<td colspan="3"><!-- All space left of notes column --></td>
<td class="save-notes">
+ [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
<input type="hidden" name="id" value="[% CGI.param('id') | html %]" />
<input type="submit" name="save_notes" value="[% l('Save Notes') %]" />
</td>
id="anonsort" name="anonsort" value=CGI.param("anonsort") %]
<input type="hidden" name="id"
value="[% CGI.param('id') | html %]" />
- <!-- just preserve this --><input type="hidden" name="sort"
- value="[% CGI.param('sort') | html %]" />
+ [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
<input type="submit" value="[% l('Sort') %]" />
</form>
</div>
- <form action="[% ctx.opac_root %]/mylist/move" method="POST">
+ <form action="[% mkurl(ctx.opac_root _ '/mylist/move') %]" method="GET">
<div>
<p class="big-strong">[% l('Temporary List') %]</p>
<table cellpadding='0' cellspacing='0' border='0'>
</optgroup>
[% END %]
</select>
+ [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
<input type="submit" value="[% l('Go') %]" />
</td>
</tr>
<a href='#'>[% l("Personal Information") %]</a>
</div>
<div class="align">
- <a href='prefs_notify'>[% l("Notification Preferences") %]</a>
+ <a href='[% mkurl('prefs_notify') %]'>[% l("Notification Preferences") %]</a>
</div>
<div class="align">
- <a href='prefs_settings'>[% l("Search Preferences") %]</a>
+ <a href='[% mkurl('prefs_settings') %]'>[% l("Search Preferences") %]</a>
</div>
[% ELSIF prefs_page == 'notify' %]
<div class="align">
- <a href='prefs'>[% l("Personal Information") %]</a>
+ <a href='[% mkurl('prefs') %]'>[% l("Personal Information") %]</a>
</div>
<div class="align selected">
<a href='#'>[% l("Notification Preferences") %]</a>
</div>
<div class="align" >
- <a href='prefs_settings'>[% l("Search Preferences") %]</a>
+ <a href='[% mkurl('prefs_settings') %]'>[% l("Search Preferences") %]</a>
</div>
[% ELSE %]
<div class="align">
- <a href='prefs'>[% l("Personal Information") %]</a>
+ <a href='[% mkurl('prefs') %]'>[% l("Personal Information") %]</a>
</div>
<div class="align">
- <a href='prefs_notify'>[% l("Notification Preferences") %]</a>
+ <a href='[% mkurl('prefs_notify') %]'>[% l("Notification Preferences") %]</a>
</div>
<div class="align selected" >
<a href='#'>[% l("Search Preferences") %]</a>
--- /dev/null
+[%-
+UNLESS params;
+ params = ['loc', 'query', 'qtype', 'sort'];
+END;
+FOR param IN params;
+ IF CGI.param(param); %]
+ <input type="hidden" name="[% param %]" value="[% CGI.param(param) | html %]" />
+ [%- END;
+END; %]
operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
%]
- <a href="[% ctx.opac_root %]/mylist/[% operation %]?record=[% ctx.bre_id %]" class="no-dec">
+ <a href="[% mkurl(ctx.opac_root _ '/mylist/' _ operation, {record => ctx.bre_id}) %]" class="no-dec">
<img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
[% label %]
</a>
</div>
[% IF ctx.mylist.size %]
<div class="results_header_btns cached_list_div">
- <a href="[% ctx.opac_root; ctx.user ? '/myopac/lists' : '/mylist' %]">[% l('View My List') %]</a>
+ [%- IF ctx.user; %]
+ <a href="[% mkurl(ctx.opac_root _ '/myopac/lists') %]">[% l('View My List') %]</a>
+ [%- ELSE %]
+ <a href="[% mkurl(ctx.opac_root _ '/mylist') %]">[% l('View My List') %]</a>
+ [%- END %]
</div>
[% END %]
<div class="results_header_div"></div>