<form id="geolocation_form" class="page" action="<?php echo $tpl['current_url']; ?>" method="post">
	<fieldset>
		<legend><?php echo __('Géolocalisation'); ?></legend>
		<br>
		<div id="geolocation_container">
			<div id="geolocation_map">
				<div id="geolocation_worldmap"
					data-layer="<?php echo $tpl['geolocation']['layer']; ?>"
					data-lat="<?php echo $tpl['category']['geolocation']['latitude_map']; ?>"
					data-long="<?php echo $tpl['category']['geolocation']['longitude_map']; ?>"
					data-marker="<?php echo $tpl['category']['geolocation']['marker']; ?>"
					data-zoom="<?php echo $tpl['geolocation']['zoom']; ?>"
				>
				</div>
				<span id="geolocation_marker" class="icon icon_marker_add"><a class="js" href="javascript:;"><?php echo __('Ajouter le marqueur'); ?></a></span>
			</div>
			<div id="geolocation_fields">
<?php if ($tpl['geolocation_categories']) : ?>
				<p class="field">
					<label for="geolocation_cat_coords"><?php echo __('Utiliser les coordonnées de cette catégorie :'); ?></label>
					<br>
					<select id="geolocation_cat_coords" name="category">
						<option value="0" data-lat="" data-long="">---</option>
<?php foreach ($tpl['geolocation_categories'] as &$i) : ?>
						<option value="<?php echo $i['id']; ?>" data-lat="<?php echo $i['latitude']; ?>" data-long="<?php echo $i['longitude']; ?>"><?php echo $i['name']; ?></option>
<?php endforeach; ?>
					</select>
				</p>
<?php endif; ?>
				<p class="field">
					<label for="geolocation_latitude"><?php echo __('Latitude :'); ?></label>
					<input class="large" name="<?php echo $tpl['category']['id']; ?>[latitude]" size="40" maxlength="99" id="geolocation_latitude" type="text" value="<?php echo $tpl['category']['geolocation']['latitude']; ?>">
				</p>
				<p class="field">
					<label for="geolocation_longitude"><?php echo __('Longitude :'); ?></label>
					<input class="large" name="<?php echo $tpl['category']['id']; ?>[longitude]" size="40" maxlength="99" id="geolocation_longitude" type="text" value="<?php echo $tpl['category']['geolocation']['longitude']; ?>">
				</p>
				<input name="anticsrf" type="hidden" value="<?php echo $tpl['anticsrf'](); ?>">
				<input class="submit" name="save" type="submit" value="<?php echo __('Enregistrer'); ?>">
			</div>
		</div>
	</fieldset>
</form>