function() {$this->controller('member');}
);
-// Otherwise just display "Member" menu item
+// Otherwise just display menus for logged in member
} else {
$mainMenuSlug = 'glm-members-admin-menu-member';
add_menu_page(
- $this->config['terms']['term_admin_menu_member'],
- $this->config['terms']['term_admin_menu_member'],
+ $this->config['terms']['term_admin_menu_members'],
+ 'GLM Associate',
'glm_members_main_menu',
'glm-members-admin-menu-member',
- function() {$this->controller('member');},
+ function() {},
false,
- '91.123'
+ '3.100'
+ );
+
+ // Add a submenu for the "Member" info page
+ add_submenu_page(
+ 'glm-members-admin-menu-member',
+ $this->config['terms']['term_admin_menu_member'],
+ 'My '.$this->config['terms']['term_admin_menu_member'],
+ 'glm_members_main_menu',
+ 'glm-members-admin-menu-member',
+ function() {$this->controller('member', 'index');}
);
}
<tr>
{if $memberInfo.fieldRequired.lat}<th class="emRequiredInputField">{else}<th>{/if}Location:</th>
<td>
- <input id="glmLat" name="lat" type="hidden" value="{$memberInfo.fieldData.lat}">
- <input id="glmLng" name="lon" type="hidden" value="{$memberInfo.fieldData.lon}">
<div id="glm-estimate-location" class="button button-secondary">Map Location Using Above Address</div>
<p>
MAP USE: Drag the pointer to the desired location for this {$terms.term_member}.
Click and drag anywhere else on the map to move to another area.
</p>
<div id="locationMap" class="glm-map-edit">(map loads here)</div>
- Selected Position: <span id="mapPosition">Lat {$memberInfo.fieldData.lat}, Lon {$memberInfo.fieldData.lon}</span>
+ <p>
+ <b>Selected Position:</b>
+ Latitude <input id="glmLat" name="lat" type="text" value="{$memberInfo.fieldData.lat}" class="glm-form-text-input-veryshort">
+ Longitude <input id="glmLng" name="lon" type="text" value="{$memberInfo.fieldData.lon}" class="glm-form-text-input-veryshort">
+ <span id="latLonRecenter" class="button button-secondary">Update pointer with new lat/lon postion.</span>
+ </p>
</td>
</tr>
</table>
<option id="" value="">(No Categories Listed - Select "Add a new Category" to the right. )</option>
{/if}
</select> Select a category to add to box below.<br>
+{else}
+ <p>You do not have permission to change your {$terms.term_member} categories. Please call if you need changes made here.
{/if}
<div id="activeCategories" class="glm-dynSelect-box">
<!-- **** Images **** -->
<table id="glm-table-images" class="glm-admin-table glm-hidden glm-member-info-table">
+ <tr>
+ <td> </td>
+ <td>
+ <p>
+ Best image size to provide is between 800 and 1000 pixels wide and stored as a JPG or JPEG file.
+ Also try to supply images that have a reasonable "aspect ratio" (not too tall, not too wide).
+ Files provided like this should have a file size of 100 to 250 KB. Images will be automatically
+ resized for use in the Web site. Images that are too large will be rejected.
+ </p>
+ </td>
+ </tr>
<tr>
<th {if $memberInfo.fieldRequired.logo}class="glm-required"{/if}>Logo:</th>
<td {if $memberInfo.fieldFail.logo}class="glm-form-bad-input" data-tabid="glm-member-info-images"{/if}>
initMap();
}
+ // Listen for changes in the lat/lon inputs
+ $('#latLonRecenter').on('click', function() {
+
+ // Get lat and lon from the input fields
+ var glmLat = $('#glmLat').val();
+ var glmLng = $('#glmLng').val();
+
+ location = new google.maps.LatLng(glmLat, glmLng);
+ initMap();
+ return false;
+
+ });
+
});
/*
glmLat = this.position.lat();
glmLng = this.position.lng();
- // Assign it to the hidden fields for submission
- $('#glmLat').val(glmLat);
- $('#glmLng').val(glmLng);
+ // Assign it to the lat/lon fields for submission
+ $('#glmLat').val(glmLat.toFixed(6));
+ $('#glmLng').val(glmLng.toFixed(6));
- // Also display it to the user
- $('#mapPosition').html('Lat ' + glmLat.toFixed(4) + ', Lon ' + glmLng.toFixed(4));
});
-
+
// When estimate location button is clicked, geocode using address
$('#glm-estimate-location').on('click', function() {
// Assign the new position to the hidden fields for submission
glmLat = results[0].geometry.location.lat();
glmLng = results[0].geometry.location.lng();
- $('#glmLat').val(glmLat);
- $('#glmLng').val(glmLng);
+ $('#glmLat').val(glmLat.toFixed(6));
+ $('#glmLng').val(glmLng.toFixed(6));
// Also display it to the user
$('#mapPosition').html('Lat ' + glmLat.toFixed(4) + ', Lon ' + glmLng.toFixed(4));
map.setCenter(results[0].geometry.location);
marker.setPosition( results[0].geometry.location );
- // Assign the new position to the hidden fields for submission
+ // Assign the new position to the lat/lon fields for submission
glmLat = results[0].geometry.location.lat();
glmLng = results[0].geometry.location.lng();
$('#glmLat').val(glmLat);
}
});
}
-
+
// Flash certain elements for a short time after display
$(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);