Line 11... |
Line 11... |
11 |
|
11 |
|
12 |
<meta name="revisit-after" content="15 days" />
|
12 |
<meta name="revisit-after" content="15 days" />
|
13 |
<meta name="robots" content="index,follow" />
|
13 |
<meta name="robots" content="index,follow" />
|
14 |
<meta name="author" content="Tela Botanica" />
|
14 |
<meta name="author" content="Tela Botanica" />
|
15 |
<meta name="keywords" content="Tela Botanica, CEL" />
|
15 |
<meta name="keywords" content="Tela Botanica, CEL" />
|
16 |
<meta name="description" content="Gestion des widgets de saisie du carnet en ligne" />
|
16 |
<meta name="description" content="Widgets de saisie du carnet en ligne" />
|
Line 17... |
Line 17... |
17 |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no" />
|
17 |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no" />
|
18 |
|
18 |
|
19 |
<!-- OpenGraph pour Facebook, Pinterest, Google+ -->
|
19 |
<!-- OpenGraph pour Facebook, Pinterest, Google+ -->
|
Line 42... |
Line 42... |
42 |
|
42 |
|
43 |
<!-- Google Analytics -->
|
43 |
<!-- Google Analytics -->
|
44 |
<?php if( $prod ): ?>
|
44 |
<?php if( $prod ): ?>
|
45 |
<?php include "analytics.html"; ?>
|
45 |
<?php include "analytics.html"; ?>
|
46 |
<?php endif; ?>
|
46 |
<?php endif; ?>
|
47 |
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
47 |
<!-- <link rel="icon" type="image/x-icon" href="favicon.ico" /> -->
|
48 |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
48 |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
Line 49... |
Line 49... |
49 |
</head>
|
49 |
</head>
|
50 |
|
50 |
|
51 |
<body>
|
51 |
<body>
|
52 |
<?php
|
52 |
<?php
|
53 |
echo ( $widget['image_fond'] ) ? '<div id="image-fond" style="' . htmlspecialchars( 'background:url("' . $widget['chemin_fichiers'] . 'image_fond.' . preg_replace( '/(?:imag)?e\/?/','',$widget['image_fond']) . '") no-repeat center center') . '"></div>': '';
|
53 |
echo ( $widget['image_fond'] ) ? '<div id="image-fond" style="' . htmlspecialchars( 'background:url("' . $widget['chemin_fichiers'] . 'image_fond.' . preg_replace( '/(?:imag)?e\/?/','',$widget['image_fond']) . '") no-repeat center center;background-size:cover') . '"></div>': '';
|
54 |
?>
|
54 |
?>
|
55 |
<!-- <?php //var_dump($widget['especes']['url_ws_autocompletion_ns']); ?> -->
|
55 |
<!-- <?php //var_dump($widget['especes']['url_ws_autocompletion_ns']); ?> -->
|
56 |
<div id="zone-appli" class="container" data-projet="<?= $widget['projet']; ?>" data-url-fichiers="<?= $widget['chemin_fichiers']; ?>">
|
56 |
<div id="zone-appli" class="container" data-projet="<?= $widget['projet']; ?>" data-url-fichiers="<?= $widget['chemin_fichiers']; ?>">
|
Line 162... |
Line 162... |
162 |
</div>
|
162 |
</div>
|
163 |
</div>
|
163 |
</div>
|
164 |
</form>
|
164 |
</form>
|
Line 165... |
Line 165... |
165 |
|
165 |
|
166 |
<!-- Messages d'erreur du formulaire-->
|
- |
|
167 |
<div class="row">
|
166 |
<!-- Messages d'erreur du formulaire-->
|
168 |
<div class="zone-alerte">
|
167 |
<div class="zone-alerte">
|
169 |
<div id="dialogue-bloquer-copier-coller" class="alert alert-info alert-block hidden"">
|
168 |
<div id="dialogue-bloquer-copier-coller" class="alert alert-info alert-block hidden">
|
170 |
<a class="close">×</a>
|
169 |
<a class="close">×</a>
|
171 |
<h4 class="alert-heading"><?= $observateur['alertcc-title']; ?></h4>
|
170 |
<h4 class="alert-heading"><?= $observateur['alertcc-title']; ?></h4>
|
172 |
<p><?= $observateur['alertcc']; ?></p>
|
171 |
<p><?= $observateur['alertcc']; ?></p>
|
173 |
</div>
|
172 |
</div>
|
174 |
<div id="dialogue-utilisateur-non-identifie" class="alert alert-warning alert-block hidden">
|
173 |
<div id="dialogue-utilisateur-non-identifie" class="alert alert-warning alert-block hidden">
|
175 |
<a class="close">×</a>
|
174 |
<a class="close">×</a>
|
176 |
<h4 class="alert-heading"><?= $observateur['alertni-title']; ?></h4>
|
175 |
<h4 class="alert-heading"><?= $observateur['alertni-title']; ?></h4>
|
177 |
<p><?= $observateur['alertni']; ?></p>
|
176 |
<p><?= $observateur['alertni']; ?></p>
|
- |
|
177 |
</div>
|
- |
|
178 |
<div id="dialogue-geoloc-ko" class="alert alert-warning alert-block hidden">
|
- |
|
179 |
<a class="close">×</a>
|
- |
|
180 |
<h4 class="alert-heading"><?= $observateur['alertgk-title']; ?></h4>
|
178 |
</div>
|
181 |
<p><?= $observateur['alertgk']; ?></p>
|
179 |
</div>
|
182 |
</div>
|
Line 180... |
Line 183... |
180 |
</div>
|
183 |
</div>
|
181 |
|
184 |
|
182 |
<form id="form-observation" role="form" autocomplete="on" class="bloc-top">
|
185 |
<form id="form-observation" role="form" autocomplete="on" class="bloc-top">
|
183 |
<h2><?= $observation['titre']; ?></h2>
|
186 |
<h2><?= $observation['titre']; ?></h2>
|
Line 184... |
Line 187... |
184 |
<div id="zone-observation" class="row">
|
187 |
<div id="zone-observation" class="row">
|
185 |
<div class="col-md-6">
|
188 |
<div class="col-md-6">
|
186 |
|
189 |
|
187 |
<div class="control-group">
|
190 |
<div class="">
|
188 |
<label for="geolocalisation" class="col-sm-8 obligatoire" title="<?= $observateur['courriel-title']; ?>">
|
191 |
<label for="geolocalisation" class="col-sm-8 obligatoire" title="<?= $observateur['courriel-title']; ?>">
|
189 |
<i class="fa fa-street-view" aria-hidden="true"></i>
|
192 |
<i class="fa fa-street-view" aria-hidden="true"></i>
|
190 |
<?= $observation['geolocalisation']; ?>
|
193 |
<?= $observation['geolocalisation']; ?>
|
- |
|
194 |
</label>
|
- |
|
195 |
<div class="col-sm-8 mb-3">
|
- |
|
196 |
<input id="geolocalisation" name="geolocalisation" type="hidden">
|
- |
|
197 |
|
- |
|
198 |
<!-- retirer "ok" après test -->
|
- |
|
199 |
<input type="hidden" id="geoloc" name="geoloc" value="ok" style="display:none">
|
- |
|
200 |
<input type="hidden" id="pays" name="pays" value="" style="display:none">
|
- |
|
201 |
<input type="hidden" id="commune-nom" name="commune-nom" value="" style="display:none">
|
- |
|
202 |
<input type="hidden" id="latitude" name="latitude" value="0.00000" style="display:none">
|
- |
|
203 |
<input type="hidden" id="longitude" name="longitude" value="0.00000" style="display:none">
|
- |
|
204 |
<input type="hidden" id="commune-insee" name="commune-insee" value="" style="display:none">
|
191 |
</label>
|
205 |
<input type="hidden" id="lieudit" name="lieudit" value="" style="display:none">
|
192 |
<div class="col-sm-8 mb-3">
|
206 |
<input type="hidden" id="station" name="station" value="" style="display:none">
|
193 |
<input id="geolocalisation" name="geolocalisation" type="hidden">
|
207 |
<input type="hidden" id="altitude" name="altitude" value="" style="display:none">
|
Line 194... |
Line 208... |
194 |
<tb-geolocation-element id="tb-geolocation"></tb-geolocation-element>
|
208 |
<tb-geolocation-element id="tb-geolocation"></tb-geolocation-element>
|
195 |
</div>
|
209 |
</div>
|
196 |
</div>
|
210 |
</div>
|
197 |
|
211 |
|
198 |
<div class="control-group">
|
212 |
<div class="">
|
199 |
<label for="milieu" class="col-sm-8">
|
213 |
<label for="milieu" class="col-sm-8">
|
Line 220... |
Line 234... |
220 |
<div class="control-group">
|
234 |
<div class="control-group">
|
221 |
<label for="date_releve" class="col-sm-8 obligatoire" title="">
|
235 |
<label for="date_releve" class="col-sm-8 obligatoire" title="">
|
222 |
<i class="fa fa-calendar" aria-hidden="true"></i>
|
236 |
<i class="fa fa-calendar" aria-hidden="true"></i>
|
223 |
<?= $observation['date']; ?>
|
237 |
<?= $observation['date']; ?>
|
224 |
</label>
|
238 |
</label>
|
225 |
<div class="col-sm-8 mb-3" id="datetimepicker">
|
239 |
<div class="col-sm-8 mb-3">
|
226 |
<input type="text" id="date_releve" name="date_releve" class="form-control date" placeholder="jj/mm/aaaa" pattern="(^(((0[1-9]|1[0-9]|2[0-8])[\/](0[1-9]|1[012]))|((29|30|31)[\/](0[13578]|1[02]))|((29|30)[\/](0[4,6,9]|11)))[\/](19|[2-9][0-9])\d\d$)|(^29[\/]02[\/](19|[2-9][0-9])(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96)$)" title="jj/mm/aaaa">
|
240 |
<input type="date" id="date_releve" name="date_releve" class="form-control" max="<?= date('Y-m-d', time()); ?>" placeholder="jj/mm/aaaa" title="jj/mm/aaaa" required>
|
227 |
</div>
|
241 |
</div>
|
228 |
</div>
|
242 |
</div>
|
Line 229... |
Line 243... |
229 |
|
243 |
|
230 |
<?php if( ( $widget['type_especes'] === 'referentiel' || $widget['type_especes'] === '' ) && $widget['referentiel'] === '' ) : ?>
|
244 |
<?php if( ( $widget['type_especes'] === 'referentiel' || $widget['type_especes'] === '' ) && $widget['referentiel'] === '' ) : ?>
|
Line 256... |
Line 270... |
256 |
<label for="taxon" class="col-sm-8 obligatoire" title="">
|
270 |
<label for="taxon" class="col-sm-8 obligatoire" title="">
|
257 |
<i class="fa fa-leaf" aria-hidden="true"></i>
|
271 |
<i class="fa fa-leaf" aria-hidden="true"></i>
|
258 |
<?= $observation['espece']; ?><?php if ( $widget['referentiel'] !== '' && $widget['referentiel'] !== NULL ) echo " (" . $widget['referentiel'] . ")"; ?>
|
272 |
<?= $observation['espece']; ?><?php if ( $widget['referentiel'] !== '' && $widget['referentiel'] !== NULL ) echo " (" . $widget['referentiel'] . ")"; ?>
|
259 |
</label>
|
273 |
</label>
|
260 |
<div class="col-sm-8 mb-3">
|
274 |
<div class="col-sm-8 mb-3">
|
261 |
<input id="taxon" name="taxon" class="form-control" type="text">
|
275 |
<input id="taxon" name="taxon" class="form-control" type="text" required>
|
262 |
</div>
|
276 |
</div>
|
263 |
</div>
|
277 |
</div>
|
Line 264... |
Line 278... |
264 |
|
278 |
|
265 |
<div class="control-group">
|
279 |
<div class="control-group">
|
Line 273... |
Line 287... |
273 |
<option value="douteuse" ><?= $observation['certDout']; ?></option>
|
287 |
<option value="douteuse" ><?= $observation['certDout']; ?></option>
|
274 |
<option value="certaine" selected="selected" ><?= $observation['certCert']; ?></option>
|
288 |
<option value="certaine" selected="selected" ><?= $observation['certCert']; ?></option>
|
275 |
</select>
|
289 |
</select>
|
276 |
</div>
|
290 |
</div>
|
277 |
</div>
|
291 |
</div>
|
278 |
<div class="control-group">
|
292 |
<div class="">
|
279 |
<label for="notes" class="col-sm-8" title="">
|
293 |
<label for="notes" class="col-sm-8" title="">
|
280 |
<i class="fa fa-pen" aria-hidden="true"></i>
|
294 |
<i class="fa fa-pen" aria-hidden="true"></i>
|
281 |
<?= $observation['notes']; ?>
|
295 |
<?= $observation['notes']; ?>
|
282 |
</label>
|
296 |
</label>
|
283 |
<div class="col-sm-8 mb-3">
|
297 |
<div class="col-sm-8 mb-3">
|
284 |
<textarea id="notes" form="form-obs" class="form-control col-md-12" rows="7" name="notes" placeholder="<?= $observation['notes_ph']; ?>"></textarea>
|
298 |
<textarea id="notes" form="form-observation" class="col-md-12" rows="7" name="notes" placeholder="<?= $observation['notes_ph']; ?>"></textarea>
|
285 |
</div>
|
299 |
</div>
|
286 |
</div>
|
300 |
</div>
|
Line 287... |
Line 301... |
287 |
|
301 |
|
288 |
</div>
|
302 |
</div>
|
Line 304... |
Line 318... |
304 |
$default = ( $champ['fieldValues']['default'] )? ' value="' . $champ['fieldValues']['default'] . '"':'';
|
318 |
$default = ( $champ['fieldValues']['default'] )? ' value="' . $champ['fieldValues']['default'] . '"':'';
|
305 |
$description = ( $champ['description'] )? ' title="' . $champ['description'] . '"':'';
|
319 |
$description = ( $champ['description'] )? ' title="' . $champ['description'] . '"':'';
|
306 |
$placeholder = ( $champ['fieldValues']['placeholder'] )? ' placeholder="' . $champ['fieldValues']['placeholder'] . '"':'';
|
320 |
$placeholder = ( $champ['fieldValues']['placeholder'] )? ' placeholder="' . $champ['fieldValues']['placeholder'] . '"':'';
|
307 |
$required = '';
|
321 |
$required = '';
|
308 |
$mandatory = '';
|
322 |
$mandatory = '';
|
309 |
$datepicker = '';
|
- |
|
310 |
$pattern = '';
|
323 |
$pattern = '';
|
311 |
$obs_radio = '';
|
324 |
$obs_radio = '';
|
312 |
$help = '';
|
325 |
$help = '';
|
313 |
$help_button = '';
|
326 |
$help_button = '';
|
Line 322... |
Line 335... |
322 |
$required = ' required';
|
335 |
$required = ' required';
|
323 |
// class="obligatoire"
|
336 |
// class="obligatoire"
|
324 |
$mandatory = ' obligatoire';
|
337 |
$mandatory = ' obligatoire';
|
325 |
}
|
338 |
}
|
Line 326... |
Line 339... |
326 |
|
339 |
|
327 |
if( 'date' === $champ['element'] ) {
|
340 |
// if( 'date' === $champ['element'] ) {
|
328 |
$datepicker = ' date';
|
341 |
// $pattern = ' pattern="(^(((0[1-9]|1[0-9]|2[0-8])[\/](0[1-9]|1[012]))|((29|30|31)[\/](0[13578]|1[02]))|((29|30)[\/](0[4,6,9]|11)))[\/](19|[2-9][0-9])\d\d$)|(^29[\/]02[\/](19|[2-9][0-9])(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96)$)"';
|
329 |
$pattern = ' pattern="(^(((0[1-9]|1[0-9]|2[0-8])[\/](0[1-9]|1[012]))|((29|30|31)[\/](0[13578]|1[02]))|((29|30)[\/](0[4,6,9]|11)))[\/](19|[2-9][0-9])\d\d$)|(^29[\/]02[\/](19|[2-9][0-9])(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96)$)"';
|
- |
|
Line 330... |
Line 342... |
330 |
}
|
342 |
// }
|
331 |
|
343 |
|
332 |
switch( $champ['element'] ) {
|
344 |
switch( $champ['element'] ) {
|
333 |
case 'radio':
|
345 |
case 'radio':
|
Line 369... |
Line 381... |
369 |
case 'list-checkbox': ?>
|
381 |
case 'list-checkbox': ?>
|
370 |
<div class="multiselect <?php echo $champ['element'] . $help; ?>">
|
382 |
<div class="multiselect <?php echo $champ['element'] . $help; ?>">
|
371 |
<label class="col-sm-8<?= $mandatory; ?>"><?= $champ['name'] . $help_button; ?></label>
|
383 |
<label class="col-sm-8<?= $mandatory; ?>"><?= $champ['name'] . $help_button; ?></label>
|
372 |
<div class="control-group col-sm-8 mb-3">
|
384 |
<div class="control-group col-sm-8 mb-3">
|
373 |
<div class="selectBox">
|
385 |
<div class="selectBox">
|
374 |
<select class="form-control" id="list-checkbox-<?= $champ['key']; ?>"<?php echo $description . $required; ?> class="form-control">
|
386 |
<select class="form-control list-checkbox" id="list-checkbox-<?= $champ['key']; ?>"<?php echo $description . $required; ?> class="form-control">
|
375 |
<option>Plusieurs choix possibles</option>
|
387 |
<option>Plusieurs choix possibles</option>
|
376 |
</select>
|
388 |
</select>
|
377 |
<div class="overSelect"></div>
|
389 |
<div class="overSelect"></div>
|
378 |
</div>
|
390 |
</div>
|
379 |
<div class="checkboxes hidden">
|
391 |
<div class="checkboxes hidden">
|
Line 447... |
Line 459... |
447 |
<?php break;
|
459 |
<?php break;
|
Line 448... |
Line 460... |
448 |
|
460 |
|
449 |
case 'range': ?>
|
461 |
case 'range': ?>
|
450 |
<div class="control-group">
|
462 |
<div class="control-group">
|
451 |
<label for="<?= $champ['key']; ?>" class="col-sm-8<?= $help . $mandatory; ?>" <?= $description; ?>><?= $champ['name'] . $help_button; ?></label>
|
463 |
<label for="<?= $champ['key']; ?>" class="col-sm-8<?= $help . $mandatory; ?>" <?= $description; ?>><?= $champ['name'] . $help_button; ?></label>
|
452 |
<div class="col-sm-8 mb-3 <?php echo ($champ['fieldValues']['min'] || $champ['fieldValues']['max']) ? 'row' : '';?>">
|
464 |
<div class="col-sm-8 mb-3 row">
|
453 |
<?php
|
465 |
<?php
|
Line -... |
Line 466... |
- |
|
466 |
$div_range_min_max = '';
|
- |
|
467 |
|
- |
|
468 |
if ( $champ['fieldValues']['min'] ) {
|
- |
|
469 |
$div_range_min_max =
|
- |
|
470 |
"<p class=\"col-sm-2 range-values text-center font-weight-bold\">".
|
- |
|
471 |
"Min " . $champ['fieldValues']['min'] .
|
- |
|
472 |
"</p>";
|
- |
|
473 |
}
|
- |
|
474 |
|
- |
|
475 |
$div_range_min_max .= '<div class="range-live-value range-values text-center font-weight-bold col-sm-';
|
454 |
if ( $champ['fieldValues']['min'] || $champ['fieldValues']['max'] ) {
|
476 |
|
- |
|
477 |
if ( $champ['fieldValues']['min'] && $champ['fieldValues']['max'] ) {
|
- |
|
478 |
$div_range_min_max .= '8';
|
- |
|
479 |
} elseif ( $champ['fieldValues']['min'] || $champ['fieldValues']['max'] ) {
|
- |
|
480 |
$div_range_min_max .= '10';
|
- |
|
481 |
} else {
|
Line 455... |
Line -... |
455 |
|
- |
|
456 |
$div_range_min_max = '';
|
- |
|
457 |
|
- |
|
458 |
if ( $champ['fieldValues']['min'] ) {
|
- |
|
459 |
$div_range_min_max =
|
- |
|
460 |
"<p class=\"col-sm-2 range-values text-center font-weight-bold\">".
|
- |
|
461 |
"Min " . $champ['fieldValues']['min'] .
|
- |
|
462 |
"</p>";
|
- |
|
463 |
}
|
- |
|
464 |
$div_range_min_max .= '<div class="range-live-value range-values text-center font-weight-bold col-sm-';
|
- |
|
465 |
|
- |
|
466 |
if ( $champ['fieldValues']['min'] && $champ['fieldValues']['max'] ) {
|
- |
|
467 |
$div_range_min_max .= '8">';
|
- |
|
468 |
} else {
|
- |
|
469 |
$div_range_min_max .= '10">';
|
482 |
$div_range_min_max .= '12';
|
470 |
}
|
- |
|
471 |
|
- |
|
472 |
$div_range_min_max .= '</div>';
|
- |
|
473 |
|
- |
|
474 |
if( $champ['fieldValues']['max'] ) {
|
- |
|
475 |
$div_range_min_max .=
|
- |
|
476 |
"<p class=\"col-sm-2 range-values text-center font-weight-bold\">".
|
- |
|
Line -... |
Line 483... |
- |
|
483 |
}
|
477 |
"Max " . $champ['fieldValues']['max'] .
|
484 |
|
- |
|
485 |
$div_range_min_max .= '"></div>';
|
- |
|
486 |
|
- |
|
487 |
if( $champ['fieldValues']['max'] ) {
|
478 |
"</p>";
|
488 |
$div_range_min_max .=
|
- |
|
489 |
"<p class=\"col-sm-2 range-values text-center font-weight-bold\">".
|
- |
|
490 |
"Max " . $champ['fieldValues']['max'] .
|
479 |
}
|
491 |
"</p>";
|
480 |
|
492 |
}
|
481 |
echo $div_range_min_max;
|
493 |
|
482 |
}
|
494 |
echo $div_range_min_max;
|
483 |
?>
|
495 |
?>
|
Line 484... |
Line 496... |
484 |
<input type="<?= $champ['element']; ?>" name="<?= $champ['key']; ?>" class="custom-range <?= $champ['key'] . $help; ?> form-control" <?= $description . $placeholder . $step . $default . $min . $max . $required; ?> data-label="<?= $champ['name']; ?>">
|
496 |
<input type="<?= $champ['element']; ?>" name="<?= $champ['key']; ?>" class="custom-range <?= $champ['key'] . $help; ?> form-control" <?= $description . $placeholder . $step . $default . $min . $max . $required; ?> data-label="<?= $champ['name']; ?>">
|
485 |
</div>
|
497 |
</div>
|
486 |
</div>
|
498 |
</div>
|
487 |
<?php break;
|
499 |
<?php break;
|
488 |
|
500 |
|
489 |
case 'number':
|
501 |
case 'number':
|
490 |
case 'date': ?>
|
502 |
case 'date': ?>
|
491 |
<div class="control-group">
|
503 |
<div class="control-group">
|
492 |
<label for="<?= $champ['key']; ?>" class="col-sm-8<?php echo $datepicker . $mandatory; ?>" <?= $description; ?>><?= $champ['name'] . $help_button; ?></label>
|
504 |
<label for="<?= $champ['key']; ?>" class="col-sm-8<?php echo $mandatory; ?>" <?= $description; ?>><?= $champ['name'] . $help_button; ?></label>
|
Line 493... |
Line 505... |
493 |
<div class="col-sm-8 mb-3">
|
505 |
<div class="col-sm-8 mb-3">
|
Line 536... |
Line 548... |
536 |
|
548 |
|
537 |
<div id="image" class="row"></div>
|
549 |
<div id="image" class="row"></div>
|
Line 538... |
Line 550... |
538 |
</div>
|
550 |
</div>
|
539 |
|
551 |
|
540 |
<!-- Bouton cr&ation d'une obs -->
|
552 |
<!-- Bouton cr&ation d'une obs -->
|
541 |
<div class="row mb-3 bloc-bottom">
|
553 |
<div class="row mb-3">
|
542 |
<div class="centre" title="<?= $resume['creer-title']; ?>">
|
554 |
<div class="centre" title="<?= $resume['creer-title']; ?>">
|
543 |
<a id="ajouter-obs" class="btn btn-primary"><i class="fas fa-check-square"></i> <?= $resume['creer']; ?></a>
|
555 |
<button id="ajouter-obs" class="btn btn-primary"><i class="fas fa-check-square"></i> <?= $resume['creer']; ?></button>
|
Line 544... |
Line 556... |
544 |
</div>
|
556 |
</div>
|
545 |
</div>
|
557 |
</div>
|
Line 561... |
Line 573... |
561 |
</div>
|
573 |
</div>
|
562 |
</div>
|
574 |
</div>
|
563 |
</div>
|
575 |
</div>
|
Line 564... |
Line 576... |
564 |
|
576 |
|
565 |
<!-- Affiche le tableau récapitualif des observations ajoutées -->
|
577 |
<!-- Affiche le tableau récapitualif des observations ajoutées -->
|
566 |
<div id="zone-liste-obs" class="hidden">
|
578 |
<div id="zone-liste-obs" class="bloc-top hidden">
|
567 |
<div class="alert alert-info">
|
579 |
<div class="alert alert-info">
|
568 |
<h2 class="transmission-title"><strong><?= $resume['titre']; ?> <span class="obs-nbre badge badge-info">0</span></strong></h2>
|
580 |
<h2 class="transmission-title"><strong><?= $resume['titre']; ?> <span class="obs-nbre badge badge-info">0</span></strong></h2>
|
569 |
<button id="transmettre-obs" class="btn btn-primary droite" disabled="disabled"
|
581 |
<button id="transmettre-obs" class="btn btn-primary droite" disabled="disabled"
|
570 |
title="<?= $resume['trans-title']; ?>" type="button">
|
582 |
title="<?= $resume['trans-title']; ?>" type="button">
|
Line 631... |
Line 643... |
631 |
</div>
|
643 |
</div>
|
632 |
</div>
|
644 |
</div>
|
633 |
</div>
|
645 |
</div>
|
634 |
</div>
|
646 |
</div>
|
635 |
<!-- carto -->
|
647 |
<!-- carto -->
|
- |
|
648 |
<?php if( $widget["type_localisation"] === 'point' ): ?>
|
- |
|
649 |
<script type="text/javascript" src="<?= $url_base; ?>modules/saisie2/squelettes/js/tb-geoloc/tb-geoloc-lib-app.js"></script>
|
- |
|
650 |
<?php elseif ( $widget["type_localisation"] === 'rue' ) : ?>
|
636 |
<script type="text/javascript" src="<?= $url_base; ?>modules/saisie2/squelettes/js/tb-geoloc/tb-geoloc-custom-element.js"></script>
|
651 |
<script type="text/javascript" src="<?= $url_base; ?>modules/saisie2/squelettes/js/tb-geoloc/tb-geoloc-custom-element.js"></script>
|
637 |
<script>
|
652 |
<?php endif; ?>
|
- |
|
653 |
<script type="text/javascript" src="<?= $url_base; ?>modules/saisie2/squelettes/js/tb-geoloc/tb-geoloc-lib-app_inputs.js"></script>
|
- |
|
654 |
<script type="text/javascript">
|
638 |
var tbGeolocation = document.getElementById('tb-geolocation');
|
655 |
var tbGeolocation = document.getElementById( 'tb-geolocation' );
|
- |
|
656 |
|
639 |
tbGeolocation.addEventListener("location", function(location) {
|
657 |
tbGeolocation.addEventListener( 'location', function( location ) {
|
640 |
console.log(location.detail);
|
658 |
console.log( location.detail );
|
- |
|
659 |
var locationDatas = location.detail;
|
- |
|
660 |
var latitude = '';
|
- |
|
661 |
var longitude = '';
|
- |
|
662 |
if ( undefined !== locationDatas.geometry.features ) {
|
- |
|
663 |
latitude = ( locationDatas.geometry.features[0].geometry.coordinates[0][1] + locationDatas.geometry.features[0].geometry.coordinates[1][1]) / 2;
|
- |
|
664 |
longitude = ( locationDatas.geometry.features[0].geometry.coordinates[0][0] + locationDatas.geometry.features[0].geometry.coordinates[1][0]) / 2;
|
- |
|
665 |
} else if ( undefined !== locationDatas.geometry.coordinates ) {
|
- |
|
666 |
latitude = locationDatas.geometry.coordinates[1];
|
- |
|
667 |
longitude = locationDatas.geometry.coordinates[0];
|
- |
|
668 |
}
|
- |
|
669 |
|
- |
|
670 |
document.getElementById('pays').value = locationDatas.osmCountry;
|
- |
|
671 |
document.getElementById('commune-nom').value = locationDatas.locality;
|
- |
|
672 |
// À modifier quand on recevra les codes insee
|
- |
|
673 |
document.getElementById('commune-insee').value = locationDatas.osmPostcode;
|
- |
|
674 |
document.getElementById('latitude').value = latitude;
|
- |
|
675 |
document.getElementById('longitude').value = longitude;
|
- |
|
676 |
document.getElementById('altitude').value = locationDatas.elevation;
|
- |
|
677 |
document.getElementById('geoloc').value = 'ok';
|
641 |
});
|
678 |
});
|
642 |
</script>
|
679 |
</script>
|
Line 643... |
Line 680... |
643 |
|
680 |
|
644 |
<!-- Jquery -->
|
681 |
<!-- Jquery -->
|
Line 645... |
Line 682... |
645 |
<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/1.11.1/jquery-1.11.1.min.js"></script>
|
682 |
<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/1.11.1/jquery-1.11.1.min.js"></script>
|
646 |
|
683 |
|
647 |
<!-- Jquery UI : nécessaire pour le minicalendrier et l'auto-complétion -->
|
684 |
<!-- Jquery UI : nécessaire pour le minicalendrier et l'auto-complétion -->
|
648 |
<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/jquery-ui/1.11.0/js/jquery-ui.min.js"></script>
|
685 |
<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/jquery-ui/1.11.0/js/jquery-ui.min.js"></script>
|
649 |
<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/jquery-ui/1.11.0/js/datepicker-fr.js"></script>
|
686 |
<!-- <script type="text/javascript" src="https://resources.tela-botanica.org/jquery/jquery-ui/1.11.0/js/datepicker-fr.js"></script> -->
|
650 |
<!-- Jquery Plugins -->
|
687 |
<!-- Jquery Plugins -->
|
651 |
<!-- Jquery Validate : nécessaire pour la validation des formulaires -->
|
688 |
<!-- Jquery Validate : nécessaire pour la validation des formulaires -->
|
652 |
<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/validate/1.11.1/jquery.validate.min.js"></script>
|
689 |
<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/validate/1.11.1/jquery.validate.min.js"></script>
|