X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=htdocs%2Fjavascript%2Fprofile.js;h=75b5b8dcc6bd30ebed16c72a2a51db72f3201fb5;hb=c76545c351fae4e2298624ff9ee5bf854dc5a5b6;hp=a24a83b981515720ec83ff7090ef3884244bd79e;hpb=98b19917a08d330ab32abad50ed41c497e7fbe73;p=platal.git diff --git a/htdocs/javascript/profile.js b/htdocs/javascript/profile.js index a24a83b..75b5b8d 100644 --- a/htdocs/javascript/profile.js +++ b/htdocs/javascript/profile.js @@ -323,14 +323,15 @@ function addressChanged(prefid) function validGeoloc(prefid, id, geoloc) { if (geoloc == 1) { - $('#' + prefid + '_cont').find('[name*=text]').val($('#' + prefid + '_cont').find('[name*=geoloc]').val()); + $('#' + prefid + '_cont').find('[name*=text]').val($('#' + prefid + '_cont').find('[name*=geocodedText]').val()); $('#' + prefid + '_cont').find('[name*=postalText]').val($('#' + prefid + '_cont').find('[name*=geocodedPostalText]').val()); } if (geoloc > 0) { - $('#' + prefid + '_cont').find("[name*='[geoloc]']").remove(); + $('#' + prefid + '_cont').find("[name*='[geocodedText]']").remove(); + $('#' + prefid + '_cont').find("[name*='[geocodedPostalText]']").remove(); } $('#' + prefid + '_cont').find('[name*=text]').removeClass('error'); - $('#' + prefid + '_cont').find('[name*=geoloc_choice]').val(geoloc); + $('#' + prefid + '_cont').find('[name*=geocodeChosen]').val(geoloc); $('.' + prefid + '_geoloc').remove(); }