From: Stéphane Jacob Date: Wed, 4 Mar 2009 15:40:44 +0000 (+0100) Subject: Switches to a 3-state geocoding: the user can choose to keep the geocoded properties... X-Git-Tag: xorg/1.0.0~332^2~344^2~2 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=425684231dd5c496b78399ee07c6d2123b836eeb;p=platal.git Switches to a 3-state geocoding: the user can choose to keep the geocoded properties with his text. --- diff --git a/modules/profile/page.inc.php b/modules/profile/page.inc.php index bb884db..628a949 100644 --- a/modules/profile/page.inc.php +++ b/modules/profile/page.inc.php @@ -267,13 +267,11 @@ abstract class ProfileGeocoding implements ProfileSetting $success = false; } } - if (isset($address['geoloc_choice'])) { - if ($address['geoloc_choice'] == 0) { - $mailer = new PlMailer('geoloc/geoloc.mail.tpl'); - $mailer->assign('text', $address['text']); - $mailer->assign('geoloc', $address['geoloc']); - $mailer->send(); - } + if (isset($address['geoloc_choice']) && ($address['geoloc_choice'] == 0)) { + $mailer = new PlMailer('geoloc/geoloc.mail.tpl'); + $mailer->assign('text', $address['text']); + $mailer->assign('geoloc', $address['geoloc']); + $mailer->send(); $gmapsGeocoder = new GMapsGeocoder(); $address = $gmapsGeocoder->stripGeocodingFromAddress($address); } diff --git a/templates/geoloc/form.address.tpl b/templates/geoloc/form.address.tpl index ed8414a..ea8b01a 100644 --- a/templates/geoloc/form.address.tpl +++ b/templates/geoloc/form.address.tpl @@ -21,9 +21,17 @@ {**************************************************************************} {if $address.geoloc} -
- La geolocalisation n'a pas donné un résultat certain, valide la nouvelle adresse - ou modifie l'ancienne pour que ton adresse puisse être prise en compte. +
+ Le géocodage n'a pas donné un résultat certain ! Tu as le choix entre : +
+ {/if} @@ -33,11 +41,6 @@ {if $address.geoloc} -
-
- Valider ta version - • - Valider la version géolocalisée {/if}
{if $address.geoloc}