From 3ccb060db98c00b4de687f0d262132e89293103c Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Tue, 27 Sep 2011 22:09:52 +0200 Subject: [PATCH] Adds button for addresses dump, so that we avoid sending too many ax ids in GET. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- htdocs/javascript/search.js | 9 +++++++++ templates/search/adv.form.tpl | 15 +++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) 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} -- 2.1.4