Setup lat lon fields on add your event form
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 20 May 2016 12:29:40 +0000 (08:29 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 20 May 2016 12:29:40 +0000 (08:29 -0400)
Need to test that the form is not redoing lat lon from the address if
there's a lat lon already set.

Toolkit/Events/AddCommonEventForm.php

index 4fc56f0..2005e37 100644 (file)
@@ -425,18 +425,6 @@ class Toolkit_Events_AddCommonEventForm
                 </div>
                 <a id="map-it" href="#">Map It</a>'
         );
-        $e[] = array(
-            'type' => 'hidden',
-            'req'  => false,
-            'name' => 'lat',
-            'opts' => array('id' => 'lat')
-        );
-        $e[] = array(
-            'type' => 'hidden',
-            'req'  => false,
-            'name' => 'lon',
-            'opts' => array('id' => 'lon')
-        );
         $e[] = array(
             'type'    => 'text',
             'req'     => true,
@@ -471,6 +459,25 @@ class Toolkit_Events_AddCommonEventForm
             'display' => 'ZIP',
             'opts'    => array('id' => 'zip')
         );
+        $e[] = array(
+            'type'    => 'header',
+            'name'    => 'gpsCordinates_rmv',
+            'display' => 'GPS Location'
+        );
+        $e[] = array(
+            'type'    => 'text',
+            'req'     => false,
+            'name'    => 'lat',
+            'display' => 'Latitude',
+            'opts'    => array('id' => 'lat')
+        );
+        $e[] = array(
+            'type'    => 'text',
+            'req'     => false,
+            'name'    => 'lon',
+            'display' => 'Longitude',
+            'opts'    => array('id' => 'lon')
+        );
         $e[] = array(
             'type'    => 'header',
             'name'    => 'eventContactHeader_rmv',