86,7 → 86,7 |
<div id="bouton-connexion" class="volet col-md-6 col-sm-8"> |
<label for="bouton-connexion"><?php echo $observateur['compte']; ?></label> |
<a id="connexion" href="<?php echo $authTpl; ?>" class="btn btn-success mr-1 mb-1" taget="_blank"><?php echo $observateur['connexion']; ?></a> |
<a id="bouton-inscription" href="https://beta.tela-botanica.org/test/inscription" class="btn btn-primary mr-1 mb-1" taget="_blank"><?php echo $observateur['inscription']; ?></a> |
<a id="bouton-inscription" href="" class="btn btn-primary mr-1 mb-1" taget="_blank"><?php echo $observateur['inscription']; ?></a> |
</div> |
<div id="creation-compte" class="volet col-md-6 col-sm-8"> |
<label for="creation-compte"><?php echo $observateur['noninscription']; ?></label> |
99,7 → 99,7 |
</a> |
<div class="volet-menu hidden"> |
<div id="profil-utilisateur"> |
<a href="https://beta.tela-botanica.org/test/inscription" taget="_blank"><?php echo $observateur['profil']; ?></a> |
<a href="" taget="_blank"><?php echo $observateur['profil']; ?></a> |
</div> |
<div id="deconnexion"><a href=""><?php echo $observateur['deconnexion']; ?></a></div> |
</div> |
187,6 → 187,7 |
<input type="hidden" id="longitude" name="longitude" value="" style="display:none"> |
<input type="hidden" id="altitude" name="altitude" value="" style="display:none"> |
<input type="hidden" id="commune-insee" name="commune-insee" value="" style="display:none"> |
<input type="hidden" id="coord-lineaire" name="coord-lineaire" value="" style="display:none"> |
</div> |
<div id="geoloc" class="col-sm-8"> |
<tb-geolocation-element |
279,7 → 280,7 |
</div> |
</div> |
|
<?php elseif ( isset( $widget['especes']['taxons'] ) && count( (array) $widget['especes']['taxons'] ) > 0 ) : ?> |
<?php elseif ( $isTaxonListe ) : ?> |
<?php ksort( $widget['especes']['taxons'] ); ?> |
<select id="taxon-liste" name="taxon-liste" class="form-control custom-select taxon-validation has-tooltip" data-toggle="tooltip" title="<?php echo $observation['liste-espece-title']; ?>"> |
<option class="choisir" value="inconnue" selected hidden><?php echo $general['choisir']; ?></option> |
602,7 → 603,7 |
|
<form id="form-upload" class="form-horizontal bloc-top" action="<?php echo $url_ws_upload ?>" method="post" enctype="multipart/form-data"> |
<h2><?php echo $image['titre']; ?></h2> |
<p class="miniature-info" class="discretion help-inline"> |
<p id="miniature-info"> |
<?php echo $image['aide']; ?> |
</p> |
<div id ="photos-conteneur" class="control-group"> |
719,33 → 720,6 |
</div> |
<!-- carto --> |
<script type="text/javascript" src="<?php echo $url_base; ?>js/tb-geoloc/tb-geoloc-lib-app.js"></script> |
<script type="text/javascript"> |
var tbGeolocation = document.getElementById( 'tb-geolocation' ); |
|
tbGeolocation.addEventListener( 'location', function( location ) { |
console.log( location.detail ); |
|
var secVal = location.detail.geometry.coordinates[1], |
firstVal = location.detail.geometry.coordinates[0], |
latitude = '', |
longitude = '', |
nomCommune = ( undefined !== location.detail.inseeData ) ? location.detail.inseeData.nom : location.detail.locality; |
|
if ( 'object' === typeof secVal && 'object' === typeof firstVal ) {// rue |
latitude = ( ( firstVal[1] + secVal[1] ) / 2 ).toFixed( 6 ); |
longitude = ( ( firstVal[0] + secVal[0] ) / 2 ).toFixed( 6 ); |
} else if ( 'number' === typeof secVal && 'number' === typeof firstVal ) {// point |
latitude = secVal; |
longitude = firstVal; |
} |
document.getElementById( 'latitude' ).value = latitude; |
document.getElementById( 'longitude' ).value = longitude; |
document.getElementById( 'pays' ).value = location.detail.osmCountry; |
document.getElementById( 'commune-nom' ).value = nomCommune; |
document.getElementById( 'altitude' ).value = location.detail.elevation; |
document.getElementById( 'commune-insee' ).value = location.detail.inseeData.code; |
}); |
</script> |
<!-- Jquery --> |
<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/1.11.1/jquery-1.11.1.min.js"></script> |
<!-- Jquery UI : nécessaire pour le minicalendrier et l'auto-complétion --> |