Commit 140b7937 by Damien Moulard

increase precision for lat & lon in presta geoloc

parent 38dbc3c5
...@@ -24,6 +24,7 @@ namespace App\Form\Type; ...@@ -24,6 +24,7 @@ namespace App\Form\Type;
use App\Entity\Geoloc; use App\Entity\Geoloc;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\Extension\Core\Type\ButtonType; use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvent;
...@@ -70,13 +71,15 @@ class GeolocFormType extends AbstractType ...@@ -70,13 +71,15 @@ class GeolocFormType extends AbstractType
} }
if ($options['with_latlon'] === true || (!empty($geoloc) && (!empty($geoloc->getLat()) || !empty($geoloc->getLon())))) { if ($options['with_latlon'] === true || (!empty($geoloc) && (!empty($geoloc->getLat()) || !empty($geoloc->getLon())))) {
$builder $builder
->add('lat', null, array( ->add('lat', NumberType::class, array(
'label' => 'Latitude :', 'label' => 'Latitude :',
'required' => false 'required' => false,
'scale' => 8
)) ))
->add('lon', null, array( ->add('lon', NumberType::class, array(
'label' => 'Longitude :', 'label' => 'Longitude :',
'required' => false 'required' => false,
'scale' => 8
)) ))
; ;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment