X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fsearch%2Fadv.form.tpl;h=29bdea5c0d5a71d2c637de1aedae25f15b6b51f2;hb=f981776842674edfa2c654e4248a7b290df98501;hp=5e618430d8345108ed36fe44c2a3462d6257e557;hpb=93f3f260cdb11c082f0ebb268b0e75d518099604;p=platal.git diff --git a/templates/search/adv.form.tpl b/templates/search/adv.form.tpl index 5e61843..29bdea5 100644 --- a/templates/search/adv.form.tpl +++ b/templates/search/adv.form.tpl @@ -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 @@ -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}