X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=templates%2Fsearch%2Fadv.form.tpl;h=d996c6927bc958ca7f797c7865e4d6a7be520f57;hb=9891bd15f772caef0c199a98f036e976bf4ab94a;hp=5e618430d8345108ed36fe44c2a3462d6257e557;hpb=93f3f260cdb11c082f0ebb268b0e75d518099604;p=platal.git diff --git a/templates/search/adv.form.tpl b/templates/search/adv.form.tpl index 5e61843..d996c69 100644 --- a/templates/search/adv.form.tpl +++ b/templates/search/adv.form.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2008 Polytechnique.org *} +{* Copyright (C) 2003-2009 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -36,7 +36,9 @@ return '...'; } - return name + '  -  ' + row[1] + ' camarades<\/em>'; + camarades = (row[1] > 1) ? "camarades" : "camarade"; + + return name + '  -  ' + row[1] + ' ' + camarades + '<\/em>'; }; } @@ -73,25 +75,13 @@ if (schoolId) { $(".autocomplete[@name='schoolTxt']").addClass('hidden_valid'); - - $("[@name='diploma']").parent().load(baseurl + 'list/diploma/', { school:schoolId }, function() { - if ($("select[@name='diploma']").children("option").size() > 1) { - $("select[@name='diploma']").attr('value', '{/literal}{$smarty.request.diploma}{literal}'); - - $("tr#diploma_ln").show(); - } else { - $("select[@name='diploma']").attr('value', ''); - - $("tr#diploma_ln").hide(); - } - }); } else { $(".autocomplete[@name='schoolTxt']").removeClass('hidden_valid'); - - $("select[@name='diploma']").attr('value', ''); - - $("tr#diploma_ln").hide(); } + + $("[@name='diploma']").parent().load(baseurl + 'list/diploma/', { school:schoolId }, function() { + $("select[@name='diploma']").attr('value', '{/literal}{$smarty.request.diploma}{literal}'); + }); } // when choosing autocomplete from list, must validate @@ -171,6 +161,10 @@ return false; }); + }).parent().find('.autocomplete').change(function() { + // If we change the value in the type="text" field, then the value in the 'integer id' field must not be used, + // to ensure that, we unset it + $(this).parent().find('.autocompleteTarget').val(''); }); }); --> @@ -284,7 +278,7 @@ Géographie - Ville + Ville ou code postal @@ -324,8 +318,8 @@ checked="checked"{/if}/>Chercher uniquement les adresses où les camarades sont - Poste - + Description + Secteur @@ -394,10 +388,10 @@ checked="checked"{/if}/>Chercher uniquement les adresses où les camarades sont {icon name="table" title="Toutes les formations"} - + Diplôme - + @@ -409,31 +403,22 @@ checked="checked"{/if}/>Chercher uniquement les adresses où les camarades sont - Messageries, networking et sites webs - - - - Adresse + + Networking et sites webs - - - - - - Type - - - + + + + + +
+ + + + + {icon name="table" title="Tous les types d'adresse"} +
{if $smarty.session.auth ge AUTH_COOKIE} @@ -443,6 +428,12 @@ checked="checked"{/if}/>Chercher uniquement les adresses où les camarades sont + + + + + + {/if}