Update for state drop down on location edit page for events
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 29 Jul 2016 20:14:31 +0000 (16:14 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 29 Jul 2016 20:14:31 +0000 (16:14 -0400)
When editing or updating events need to have empty for state.
Some of the events did not have location completed.

index.php
views/admin/events/editLocation.html

index 44ea55e..71b09e2 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database Events
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 1.2.25
+ * Version: 1.2.26
  * Author: Chuck Scott
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -20,7 +20,7 @@
  * @package glmMembersDatabaseEventsAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.2.25
+ * @version 1.2.26
  */
 
 /*
@@ -38,7 +38,7 @@
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.2.25');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.2.26');
 define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.0.18');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index 29b82a2..f0a3636 100644 (file)
@@ -27,7 +27,7 @@
         <td id="placeLocationDeletesHere" colspan="2">
 
             <!--  Only doing one event at a time  - edit.html has JAVAscript code to create the first and only one
-                <a id="addLocation" class="button button-primary glm-button glm-right">Add a Location</a> 
+                <a id="addLocation" class="button button-primary glm-button glm-right">Add a Location</a>
             -->
 
         </td>
@@ -53,7 +53,7 @@
             </table>
         </td>
     </tr>
-    
+
     <tr id="locationContainer" {if $event.fieldData.use_member_location.value}class="glm-hidden"{/if}>
         <td>
             <table id="locationTable" width="100%">
@@ -99,6 +99,7 @@
                                 <th>State:</th>
                                 <td>
                                     <select id="state_{$loc.id}" data-id="{$loc.id}" class="location-address" name="Loc{$loc.id}_state">
+                                        <option value=""></option>
                         {foreach from=$loc.state.list item=v}
                                         <option value="{$v.value}"{if $v.default} selected="selected"{/if}>
                                             {$v.name}
                                     <div id="glm-estimate-location_{$loc.id}" class="button button-secondary">Map Location Using Above Address</div>
                                     <p>
                                         <div id="locationMap_{$loc.id}" class="glm-map-edit">(map loads here)</div>
-                                        <p>                
-                                            <b>Position:</b> 
+                                        <p>
+                                            <b>Position:</b>
                                             &nbsp;Lat <input id="glmLat_{$loc.id}" name="Loc{$loc.id}_lat" type="text" value="{$loc.lat}" class="glm-form-text-input-veryshort">
                                             &nbsp;Lon <input id="glmLng_{$loc.id}" name="Loc{$loc.id}_lon" type="text" value="{$loc.lon}" class="glm-form-text-input-veryshort">
                                             &nbsp;&nbsp;<span data-id="{$loc.id}" class="button button-secondary latLonRecenter">Update pointer</span><br>
     <tr class="location_{ newLocID }">
         <td>
             <input type="hidden" name="locID[{ newLocID }]" value="{ newLocID }">
-    {if $haveEvent}            
+    {if $haveEvent}
             <input type="hidden" name="{ newLocID }_event" value="{$event.fieldData.id}"> <!-- required to have event id with prefix -->
     {/if}
             <table width="100%">
                         <div id="glm-estimate-location_{ newLocID }" class="button button-secondary">Map Location Using Address</div>
                         <p>
                             <div id="locationMap_{ newLocID }" class="glm-map-edit">(map loads here)</div>
-                            <p>                            
-                                <b>Position:</b> 
+                            <p>
+                                <b>Position:</b>
                                 &nbsp;Lat <input id="glmLat_{ newLocID }" name="{ newLocID }_lat" type="text" value="{$newLocation.fieldData.lat}" class="glm-form-text-input-veryshort">
                                 &nbsp;Lon <input id="glmLng_{ newLocID }" name="{ newLocID }_lon" type="text" value="{$newLocation.fieldData.lon}" class="glm-form-text-input-veryshort">
                                 &nbsp;&nbsp;<span data-id="{ newLocID }" class="button button-secondary latLonRecenter">Update pointer.</span><br>
             </table>
         </td>
     </tr>
-</table>
\ No newline at end of file
+</table>