# Delete leftovers from the login form
$self->delete('Bugzilla_remember', 'GoAheadAndLogIn');
+ # Delete the token if we're not updating the defaults
+ unless (defined $self->param('remtype') && $self->param('remtype') eq 'asdefault') {
+ $self->delete("token");
+ }
+
foreach my $num (1,2,3) {
# If there's no value in the email field, delete the related fields.
if (!$self->param("email$num")) {
# Set 'urlquerypart' once the buglist ID is known.
$vars->{'urlquerypart'} = $params->canonicalise_query('order', 'cmdtype',
- 'query_based_on');
+ 'query_based_on',
+ 'token');
if ($format->{'extension'} eq "csv") {
# We set CSV files to be downloaded, as they are designed for importing
return;
var form = YAHOO.util.Dom.getAncestorByTagName(form_member, 'form');
+ // Disable the token field so setForm doesn't include it
+ var reenable_token = false;
+ if (form['token'] && !form['token'].disabled) {
+ form['token'].disabled = true;
+ reenable_token = true;
+ }
var query = YAHOO.util.Connect.setForm(form);
+ if (reenable_token)
+ form['token'].disabled = false;
window.History.replaceState(null, document.title, '?' + query);
}
&list_id=[% cgi.param('list_id') FILTER uri %]
[%~ END %]
[% END %]
+ [% ELSIF cgi.param('token') != '' %]
+ [% new_url = 'buglist.cgi?'
+ _ cgi.canonicalise_query('token', 'cmdtype', 'remtype') %]
[% END %]
if (history && history.replaceState) {
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
+[% javascript = BLOCK %]
+function remove_token() {
+ if (queryform.token) {
+ var asDefault = document.getElementById('remasdefault');
+ queryform.token.disabled = !asDefault.checked;
+ }
+}
+[% END %]
[% PROCESS global/header.html.tmpl
title = "Search for $terms.bugs"
yui = [ 'autocomplete', 'calendar' ]
+ javascript = javascript
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js"]
style_urls = [ "skins/standard/search_form.css" ]
doc_section = "query.html"
<p id="search_help">Hover your mouse over each field label to get help for that field.</p>
-<form method="post" action="buglist.cgi" name="queryform" id="queryform">
+<form method="post" action="buglist.cgi" name="queryform" id="queryform"
+ onsubmit="remove_token()">
[% PROCESS search/form.html.tmpl %]