summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authorSimon Green <sgreen+mozilla@redhat.com>2012-06-29 06:52:38 +0200
committerByron Jones <bjones@mozilla.com>2012-06-29 06:52:38 +0200
commit05799e2104eb3fbef69092804c1e16eff9ec47de (patch)
treecc01c3bf7ab9cc15c1dd0ebd7e7e901b9bc66b67 /template/en/default
parentd40758a66863fb74cc817966fce44e6e7050895b (diff)
downloadbugzilla-05799e2104eb3fbef69092804c1e16eff9ec47de.tar.gz
bugzilla-05799e2104eb3fbef69092804c1e16eff9ec47de.tar.xz
Bug 762783: Change dependent bugs to use POST when the url exceeds the url length limit
r=glob, a=LpSolit
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/bug/dependency-tree.html.tmpl26
1 files changed, 21 insertions, 5 deletions
diff --git a/template/en/default/bug/dependency-tree.html.tmpl b/template/en/default/bug/dependency-tree.html.tmpl
index 57fcdaa56..9f6590a73 100644
--- a/template/en/default/bug/dependency-tree.html.tmpl
+++ b/template/en/default/bug/dependency-tree.html.tmpl
@@ -64,11 +64,27 @@
[% END %]
</h3>
[% IF ids.size %]
- ([% IF maxdepth -%]Up to [% maxdepth %] level[% "s" IF maxdepth > 1 %] deep | [% END -%]
- <a href="buglist.cgi?bug_id=[% ids.join(",") %]">view as [% terms.bug %] list</a>
- [% IF user.in_group('editbugs') && ids.size > 1 %]
- | <a href="buglist.cgi?bug_id=[% ids.join(",") %]&amp;tweak=1">change several</a>
- [% END %])
+ [%# 27 chars is the length of buglist.cgi?tweak=&bug_id=" %]
+ [% use_post = (ids.join(",").length > constants.CGI_URI_LIMIT - 27 ) ? 1 : 0 %]
+ [% IF use_post %]
+ <form action="buglist.cgi" method="post">
+ <input type="hidden" name="bug_id" value="[% ids.join(",") %]">
+ [% END %]
+
+ [% IF maxdepth -%]Up to [% maxdepth %] level[% "s" IF maxdepth > 1 %] deep | [% END -%]
+ [% IF use_post %]
+ <button>view as [% terms.bug %] list</button>
+ [% IF user.in_group('editbugs') && ids.size > 1 %]
+ | <button type="submit" name="tweak" value="1">change several</button>
+ [% END %]
+ </form>
+ [% ELSE %]
+ <a href="buglist.cgi?bug_id=[% ids.join(",") %]">view as [% terms.bug %] list</a>
+ [% IF user.in_group('editbugs') && ids.size > 1 %]
+ | <a href="buglist.cgi?bug_id=[% ids.join(",") %]&amp;tweak=1">change several</a>
+ [% END %]
+ [% END %]
+
<ul class="tree">
[% INCLUDE display_tree tree=$tree_name %]
</ul>