From: Stéphane Jacob Date: Tue, 27 Sep 2011 20:09:52 +0000 (+0200) Subject: Adds button for addresses dump, so that we avoid sending too many ax ids in GET. X-Git-Tag: xorg/1.1.4~120 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=3ccb060db98c00b4de687f0d262132e89293103c;p=platal.git Adds button for addresses dump, so that we avoid sending too many ax ids in GET. Signed-off-by: Stéphane Jacob --- diff --git a/htdocs/javascript/search.js b/htdocs/javascript/search.js index ddee7d9..29ba340 100644 --- a/htdocs/javascript/search.js +++ b/htdocs/javascript/search.js @@ -331,5 +331,14 @@ function searchForJobTerm(treeid, jtid, full_name) $("input[name='jobterm']").val(jtid); } +function addressesDump() +{ + if ($('#addresses_dump:checked').length > 0) { + $('#recherche').attr('action', 'search/adv/addresses').attr('method', 'post').removeAttr('onsubmit'); + } else { + $('#recherche').attr('action', 'search/adv').attr('method', 'get'); + } +} + // }}} // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --git a/templates/search/adv.form.tpl b/templates/search/adv.form.tpl index 6f38815..0a425a1 100644 --- a/templates/search/adv.form.tpl +++ b/templates/search/adv.form.tpl @@ -272,7 +272,7 @@ - {if hasPerm('admin,edit_directory')} + {if hasPerm('admin,edit_directory')} Matricule AX @@ -280,9 +280,9 @@
Entrer une liste de matricules AX (un par ligne) - {/if} - {if $smarty.session.auth ge AUTH_COOKIE} + {/if} + {if $smarty.session.auth ge AUTH_COOKIE} @@ -295,7 +295,14 @@ - {/if} + {/if} + {if hasPerm('admin,edit_directory')} + + + + + + {/if}