Subversion Repositories eFlore/Applications.cel

Rev

Rev 3802 | Rev 3813 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3638 delphine 1
<!DOCTYPE html>
2
<html xmlns="https://www.w3.org/1999/xhtml">
3
	<head>
4
		<title><?php echo strip_tags( $widget['titre'] ); ?></title>
5
 
6
		<meta charset="utf-8" />
7
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
8
		<meta http-equiv="Content-style-type" content="text/css" />
9
		<meta http-equiv="Content-script-type" content="text/javascript" />
10
		<meta http-equiv="Content-language" content="fr" />
11
 
12
		<meta name="revisit-after" content="15 days" />
13
		<meta name="robots" content="index,follow" />
14
		<meta name="author" content="Tela Botanica" />
15
		<meta name="keywords" content="Tela Botanica, CEL" />
16
		<meta name="description" content="Widgets de saisie du carnet en ligne" />
17
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no" />
18
 
19
		<!-- OpenGraph pour Facebook, Pinterest, Google+ -->
20
		<meta property="og:type" content="website" />
21
		<meta property="og:title" content="Widgets de saisie du CeL" />
22
		<meta property="og:site_name" content="Tela Botanica" />
23
		<meta property="og:description" content="Widgets de saisie du Carnet en Ligne" />
24
		<meta property="og:image" content="https://resources.tela-botanica.org/tb/img/256x256/carre_englobant.png" />
25
		<meta property="og:image:type" content="image/png" />
26
		<meta property="og:image:width" content="256" />
27
		<meta property="og:image:height" content="256" />
28
		<meta property="og:locale" content="fr_FR" />
29
 
30
		<!-- Favicone -->
31
		<link rel="shortcut icon" type="image/x-icon" href="https://resources.tela-botanica.org/tb/img/16x16/favicon.ico" />
32
		<!-- Jquery-ui custom css-->
33
		<link href="https://www.tela-botanica.org/commun/jquery/jquery-ui/1.8.18/css/smoothness/jquery-ui-1.8.18.custom.css" rel="stylesheet" type="text/css" media="screen" />
34
		<!-- Bootstrap CSS -->
35
		<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous" />
36
		<!-- Fontawesome -->
37
		<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
38
		<!-- Carto -->
39
		<link href="<?php echo $url_base; ?>js/tb-geoloc/styles.css" rel="stylesheet" type="text/css" media="screen" />
40
		<!-- STYLE SAISIE -->
41
		<link href="<?php echo $url_base; ?>css/saisie.css" rel="stylesheet" type="text/css" media="screen" />
42
		<link href="<?php echo $url_base; ?>css/saisieSpe.css" rel="stylesheet" type="text/css" media="screen" />
43
 
44
		<!--  Google Analytics -->
45
		<?php if( $prod ): ?>
46
			<?php include "analytics.html"; ?>
47
		<?php endif; ?>
48
		<!-- <link rel="icon" type="image/x-icon" href="favicon.ico" /> -->
49
		<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
50
		<style>
3710 idir 51
			:not(.miniature).loading::after {
3638 delphine 52
				content:'';
53
				display: inline-block;
54
				background-image: url("<?php echo $url_base; ?>img/icones/chargement-image.gif");
55
				background-size: 1rem;
56
				height: 1rem;
57
				width: 1rem;
58
			}
59
		</style>
60
	</head>
61
 
62
	<body id="top" data-sq="<?php echo $url_base; ?>" data-type-loc="<?php echo $widget['type_localisation'];?>">
63
		<?php
64
			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>': '';
65
		?>
66
		<div id="zone-appli" class="container" data-projet="<?php echo $widget['projet']; ?>" data-url-fichiers="<?php echo $widget['chemin_fichiers']; ?>">
67
			<div class="layout-wrapper page">
68
				<div class="row mb-3">
69
					<div class="col-md-2 col-sm-10">
70
						<img id="logo" class="mr-3" src="<?php echo htmlspecialchars( $widget['chemin_fichiers'] . 'logo.' . preg_replace( '/(?:imag)?e\/?/','', $widget['logo'] ) ); ?>" alt="logo <?php echo $widget['projet']; ?>" />
71
					</div>
72
					<div class="col-md-10 col-sm-12">
73
						<h1 id="titre-projet" class="mt-0"><?php echo ( $widget['info'] ) ? $widget['titre'] . ' <div id="info-button" class="btn btn-outline-info btn-sm border-0" data-mime-info="' . $widget['info'] . '"><i class="fas fa-info-circle"></i></div>' : $widget['titre']; ?></h1>
74
					</div>
75
				</div>
76
 
77
				<div class="row mb-3">
78
					<div class="col-md-6">
79
						<div id="description"><?php echo $widget['description']; ?></div>
80
					</div>
81
					<div class="col-md-6">
82
						<div id="aide" class="well well-lg hidden-sm-down">
83
							<h3><?php echo $aide['titre']; ?></h3>
84
							<div id="aide-txt" class="hiden-sm-down">
85
								<p><?php echo $aide['description']; ?></p>
86
							</div>
87
						</div>
88
					</div>
89
				</div>
90
 
91
				<div id="formulaire" class="row mb-3 bloc-top">
92
					<form id="form-observateur" role="form" autocomplete="on">
93
						<h2><?php echo $observateur['titre']; ?></h2>
94
						<div id="tb-observateur">
95
							<div class="navbar-default mb-3" id="tb-navbar">
96
								<div class="nav navbar-nav navbar-right row control-group">
97
									<div id="bouton-connexion" class="volet col-md-6 col-sm-8">
98
										<label for="bouton-connexion"><?php echo $observateur['compte']; ?></label>
99
										<a id="connexion" href="<?php echo $authTpl; ?>" class="btn btn-success  mr-1 mb-1" target="_blank"><?php echo $observateur['connexion']; ?></a>
100
										<a id="inscription" href="" class="btn btn-primary mr-1 mb-1" target="_blank"><?php echo $observateur['inscription']; ?></a>
101
									</div>
102
									<div id="creation-compte" class="volet col-md-6 col-sm-8">
103
										<label for="creation-compte"><?php echo $observateur['noninscription']; ?></label>
104
										<a id="bouton-anonyme" href="" class="btn btn-info mr-1 mb-1"><?php echo $observateur['nonconnexion']; ?></a>
105
									</div>
106
									<div id="utilisateur-connecte" class="volet hidden">
107
										<label for="utilisateur-connecte"><?php echo $observateur['bienvenue']; ?></label>
108
										<a href="" class="list-tool btn btn-large btn-primary volet-toggle" data-toggle="volet">
109
											<span id="nom-complet"></span> <!-- <i class="fas fa-caret-down"></i> -->
110
										</a>
111
										<div class="volet-menu hidden">
112
											<div id="profil-utilisateur">
113
												<a href="" target="_blank"><?php echo $observateur['profil']; ?></a>
114
											</div>
115
											<div id="deconnexion"><a href=""><?php echo $observateur['deconnexion']; ?></a></div>
116
										</div>
117
									</div>
118
								</div>
119
							</div>
120
						</div>
121
 
122
						<div id="identite" class="mb-3 hidden">
123
							<p id="bienvenue" class=" col-md-6 hidden font-weight-bold">
124
								Bonjour<span id="bienvenue-prenom"></span><span id="bienvenue-nom"></span>!
125
							</p>
126
							<div id="zone-courriel" class="row">
127
								<div class="control-group col-md-6">
128
									<label for="courriel" class="col-sm-8 obligatoire" title="<?php echo $observateur['courriel-title']; ?>">
129
										<i class="fa fa-envelope" aria-hidden="true"></i>
130
										<?php echo $observateur['courriel']; ?>
131
									</label>
132
									<div class="col-sm-8 mb-3">
133
										<input id="courriel" name="courriel" class="form-control" type="email" title="<?php echo $observateur['courriel-title']; ?> ">
134
										<input id="id_utilisateur" name="id_utilisateur" type="hidden">
135
									</div>
136
								</div>
137
 
138
								<div id="zone-courriel-confirmation" class="control-group col-md-6 hidden">
139
									<label for="courriel_confirmation" class="col-sm-8 obligatoire" title="<?php echo $observateur['courriel-confirmation-title']; ?>">
140
										<i class="fa fa-envelope" aria-hidden="true"></i>
141
										<?php echo $observateur['courriel-confirmation']; ?>
142
									</label>
143
									<div class="col-sm-8">
144
										<input id="courriel_confirmation" name="courriel_confirmation" class="form-control" type="email">
145
									</div>
146
								</div>
147
							</div>
148
 
149
							<div id="zone-prenom-nom" class="row hidden">
150
								<div class="control-group col-md-6">
151
									<label for="prenom" class="col-sm-8">
152
										<i class="fa fa-user" aria-hidden="true"></i>
153
										<?php echo $observateur['prenom']; ?>
154
									</label>
155
									<div class="input-group col-sm-8">
156
										<input id="prenom" name="prenom" class="form-control" type="text">
157
									</div>
158
								</div>
159
								<div class="control-group col-md-6">
160
									<label for="nom" class="col-sm-8">
161
										<i class="fa fa-user" aria-hidden="true"></i>
162
										<?php echo $observateur['nom']; ?>
163
									</label>
164
									<div class="input-group col-sm-8">
165
										<input id="nom" name="nom" class="form-control" type="text">
166
									</div>
167
								</div>
168
							</div>
169
						</div>
170
					</form>
171
 
172
					<!-- Messages d'erreur du formulaire-->
173
					<div class="zone-alerte">
174
						<div id="dialogue-bloquer-copier-coller" class="alert alert-info alert-block hidden">
175
							<a class="close">×</a>
176
							<h4 class="alert-heading"><?php echo $observateur['alertcc-title']; ?></h4>
177
							<p><?php echo $observateur['alertcc']; ?></p>
178
						</div>
179
						<div id="dialogue-utilisateur-non-identifie" class="alert alert-warning alert-block hidden">
180
							<a class="close">×</a>
181
							<h4 class="alert-heading"><?php echo $observateur['alertni-title']; ?></h4>
182
							<p><?php echo $observateur['alertni']; ?></p>
183
						</div>
184
					</div>
185
 
186
					<form id="form-observation" role="form" autocomplete="on" class="bloc-top">
187
						<h2><?php echo $observation['titre']; ?></h2>
188
						<div id="zone-observation" class="row">
189
							<div class="col-md-6">
190
 
191
								<div class="mb-3">
192
									<label for="geolocalisation" class="col-sm-8 obligatoire has-tooltip" data-toggle="tooltip" title="<?php echo $observation['geoloc-title']; ?>">
193
										<i class="fa fa-street-view" aria-hidden="true"></i>
194
										<?php echo $observation['geolocalisation']; ?>
195
									</label>
196
									<div class="control-group">
197
										<div id="geoloc-datas">
198
											<input type="hidden" id="pays" name="pays" value="" style="display:none">
199
											<input type="hidden" id="commune-nom" name="commune-nom" value="" style="display:none">
200
											<input type="hidden" id="geometry" name="geometry" value="" style="display:none">
201
											<input type="hidden" id="latitude" name="latitude" value="" style="display:none">
202
											<input type="hidden" id="longitude" name="longitude" value="" style="display:none">
203
											<input type="hidden" id="altitude" name="altitude" value="" style="display:none">
204
											<input type="hidden" id="commune-insee" name="commune-insee" value="" style="display:none">
205
											<input type="hidden" id="coord-lineaire" name="coord-lineaire" value="" style="display:none">
206
										</div>
207
										<div id="geoloc" class="col-sm-12">
208
											<tb-geolocation-element
209
												id="tb-geolocation"
210
												layer='osm'
211
												zoom_init="<?php echo ( isset($widget['localisation']['zoom']) ) ? $widget['localisation']['zoom']: '4' ;?>"
212
												lat_init="<?php echo ( isset($widget['localisation']['latitude']) ) ? $widget['localisation']['latitude']: '46.5' ;?>"
213
												lng_init="<?php echo ( isset($widget['localisation']['longitude'])) ? $widget['localisation']['longitude'] : '2.9' ;?>"
214
												marker="<?php echo ( $widget['type_localisation'] === 'point' ) ? 'true' : 'false' ;?>"
215
												polyline="<?php echo ( $widget['type_localisation'] === 'rue' ) ? 'true' : 'false' ;?>"
216
												polygon="false"
217
												show_lat_lng_elevation_inputs="<?php echo ( $widget['type_localisation'] === 'point' ) ? 'true' : 'false' ;?>"
218
												osm_class_filter=""
3811 idir 219
												geometry_filter="<?php echo ($widget['type_localisation'] === 'rue' ) ? 'linestring' : 'point' ;?>"
3638 delphine 220
												elevation_provider="mapquest"
221
												map_quest_api_key="mG6oU5clZHRHrOSnAV0QboFI7ahnGg34"
3811 idir 222
												height="400px"
3638 delphine 223
											>
224
											</tb-geolocation-element>
225
										</div>
226
									</div>
227
								</div>
228
 
229
								<div class="control-group">
230
									<label for="lieudit" class="col-sm-8">
231
										<i class="fa fa-map-signs" aria-hidden="true"></i>
232
										<?php echo $observation['lieudit']; ?>
233
									</label>
234
									<div class="col-sm-8 mb-3">
235
										<input type="text" id="lieudit" name="lieudit" class="form-control has-tooltip" data-toggle="tooltip" title="<?php echo $observation['lieudit-title']; ?>">
236
									</div>
237
								</div>
238
								<div class="control-group">
239
									<label for="station" class="col-sm-8">
240
										<i class="fa fa-map-marker" aria-hidden="true"></i>
241
										<?php echo $observation['station']; ?>
242
									</label>
243
									<div class="col-sm-8 mb-3">
244
										<input type="text" id="station" name="station" class="form-control has-tooltip" data-toggle="tooltip" data-placement="bottom"title="<?php echo $observation['station-title']; ?>">
245
									</div>
246
								</div>
247
 
248
							</div>
249
 
250
							<div class="col-md-6">
251
 
252
								<div class="control-group">
253
									<label for="date_releve" class="col-sm-8 obligatoire">
254
										<i class="fa fa-calendar" aria-hidden="true"></i>
255
										<?php echo $observation['date']; ?>
256
									</label>
257
									<div class="col-sm-8 mb-3 has-tooltip" data-toggle="tooltip" title="<?php echo $observation['date-title']; ?>">
258
										<input type="date" id="date_releve" name="date_releve" class="form-control" max="<?php echo date('Y-m-d', time()); ?>" placeholder="jj/mm/aaaa" required>
259
									</div>
260
								</div>
261
 
262
								<?php if( ( $widget['type_especes'] === 'referentiel' || empty( $widget['type_especes'] ) ) && empty( $widget['referentiel'] ) ) : ?>
263
									<div class="control-group">
264
										<label for="referentiel" class="col-sm-8 obligatoire">
265
											<i class="fa fa-book" aria-hidden="true"></i>
266
											<?php echo $observation['referentiel']; ?>
267
										</label>
268
										<div class="col-sm-8 mb-3">
269
											<select id="referentiel" class="form-control custom-select has-tooltip" data-toggle="tooltip" title="<?php echo $observation['referentiel-title']; ?>">
270
												<option class="choisir" value="" selected hidden><?php echo $general['choisir']; ?></option>
3802 delphine 271
												<option value="bdtfxr" selected="selected" title="Trachéophytes de France métropolitaine et régions avoisinantes">Métropole (index réduit)</option>
3638 delphine 272
												<option value="bdtfx" title="Trachéophytes de France métropolitaine">Métropole (BDTFX)</option>
273
												<option value="bdtxa" title="Trachéophytes des Antilles">Antilles françaises (BDTXA)</option>
274
												<option value="bdtre" title="Trachéophytes de La Réunion">Réunion (BDTRE)</option>
275
												<option value="aublet" title="Guyane">Guyane (AUBLET2)</option>
276
												<option value="florical" title="Nouvelle-Calédonie">Nouvelle-Calédonie (FLORICAL)</option>
277
												<option value="isfan" title="Afrique du Nord">Afrique du Nord (ISFAN)</option>
278
												<option value="apd" title="Afrique de l'Ouest et du Centre">Afrique de l'Ouest et du Centre (APD)</option>
279
												<option value="lbf" title="Liban">Liban (LBF)</option>
3802 delphine 280
												<option value="taxreflich" title="Lichens de France">Lichens (TaxRef)</option>
281
												<option value="taxref" title="Flore de France métropolitaine et outre-mer">France (TaxRef)</option>
3638 delphine 282
												<option value="autre" title="Autre/Inconnu">Autre/Inconnu</option>
283
											</select>
284
										</div>
285
									</div>
286
								<?php else : ?>
287
									<input id="referentiel" name="referentiel" value="<?php echo $widget['referentiel']; ?>" type="hidden">
288
								<?php endif; ?>
289
 
290
								<div id="bloc-taxon" class="control-group">
291
									<?php $isTaxonListe = ( isset( $widget['especes']['taxons'] ) && count( (array) $widget['especes']['taxons'] ) > 0 ) ;?>
292
									<label <?php echo ( !$isTaxonListe ) ? 'id="taxon-autocomplete-label" for="taxon"' : 'for="taxon-liste"';?> class="col-sm-8">
293
										<i class="fa fa-leaf" aria-hidden="true"></i>
294
										<?php echo $observation['espece']; ?><?php if ( !empty( $widget['referentiel'] ) ) echo " (" . $widget['referentiel'] . ")"; ?>
295
									</label>
296
									<div class="col-sm-8 mb-3">
297
										<?php if ( $widget['type_especes'] === 'fixe' || $widget['especes']['espece_imposee'] ) : ?>
298
													<input id="taxon" name="taxon" type="text" class="form-control taxon-validation" title="" value="<?php echo $widget['especes']['nom_sci_espece_defaut']; ?>"/>
299
												</div>
300
											</div>
301
 
302
										<?php elseif ( $isTaxonListe ) : ?>
303
											<?php ksort( $widget['especes']['taxons'] ); ?>
304
													<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']; ?>">
305
														<option class="choisir"  value="inconnue" selected hidden><?php echo $general['choisir']; ?></option>
306
														<?php foreach ($widget['especes']['taxons'] as $taxon)  : ?>
307
															<option
308
																class="nom-sci"
309
																value="<?php echo $taxon['nom_sel'];?>"
310
																title="<?php echo $taxon['nom_fr'];?>"
311
																data-num-nom-sel="<?php echo $taxon['num_nom_sel'];?>"
312
																data-nom-ret="<?php echo $taxon['nom_ret'];?>"
313
																data-num-nom-ret="<?php echo $taxon['num_nom_ret'];?>"
314
																data-nt="<?php echo $taxon['num_taxon'];?>"
315
																data-famille="<?php echo $taxon['famille'];?>"
316
															><?php echo $taxon['nom_sel'];?></option>
317
														<?php endforeach; ?>
318
														<option value="autre"><?php echo $observation['autre-espece']; ?></option>
319
													</select>
320
													<span for="taxon-liste" class="error" style="display: none;"><?php echo $observation['error-taxon'];?></span>
321
													<input id="taxon" name="taxon" class="form-control" type="hidden" />
322
												</div>
323
											</div>
324
											<div id="taxon-input-groupe" class="control-group hidden">
325
												<label id="taxon-autocomplete-label" for="taxon-autre" class="col-sm-8" title="">
326
													<i class="fab fa-pagelines" aria-hidden="true"></i>
327
													<?php echo $observation['autre-espece']; ?>
328
												</label>
329
												<div class="col-sm-8 mb-3">
330
													<input id="taxon-autre" name="taxon-autre" class="form-control has-tooltip" type="text" data-toggle="tooltip" title="<?php echo $observation['espece-title']; ?>">
331
												</div>
332
											</div>
333
										<?php else : ?>
334
													<input id="taxon" name="taxon" class="form-control taxon-validation has-tooltip" type="text" data-toggle="tooltip" title="<?php echo $observation['espece-title']; ?>">
335
													<span for="taxon" class="error" style="display: none;"><?php echo $observation['error-taxon'];?></span>
336
												</div>
337
											</div>
338
										<?php endif; ?>
339
 
340
								<div class="control-group">
341
									<label for="certitude" class="col-sm-8 obligatoire">
342
										<i class="fa fa-question" aria-hidden="true"></i>
343
										<?php echo $observation['certitude']; ?>
344
									</label>
345
									<div class="col-sm-8 mb-3">
346
										<select id="certitude" name="certitude" class="form-control custom-select has-tooltip" data-toggle="tooltip" title="<?php echo $observation['certitude-title']; ?>">
347
											<option class="aDeterminer" value="à determiner" ><?php echo $observation['certADet']; ?></option>
348
											<option class="douteux" value="douteux" ><?php echo $observation['certDout']; ?></option>
349
											<option class="certain" value="certain" selected="selected" ><?php echo $observation['certCert']; ?></option>
350
										</select>
351
									</div>
352
								</div>
353
								<!-- choix du (des) milieu(x) -->
354
								<?php if ( 0 < count( (array) $widget['milieux'] ) ) :?>
355
									<?php if ( in_array('multimilieux', $widget['milieux'] ) ) :?>
356
										<div class="multiselect list-checkbox">
357
											<label class="col-sm-8" title="<?php echo $chpsupp['select-checkboxes-texte'];?>">
358
												<i class="fa fa-street-view" aria-hidden="true"></i>
359
												<?php echo $observation['milieu']; ?>
360
											</label>
361
											<div class="control-group col-sm-8 mb-3 has-tooltip" data-toggle="tooltip" title="<?php echo $observation['liste-milieu-title']; ?>">
362
												<div class="selectBox">
363
													<select class="form-control list-checkbox custom-select" id="list-checkbox-milieu">
364
														<option><?php echo $chpsupp['select-checkboxes-texte'];?></option>
365
													</select>
366
													<div class="overSelect"></div>
367
												</div>
368
												<div class="checkboxes hidden" data-name="milieu">
369
													<?php foreach ( $widget['milieux'] as $milieu ) :?>
370
														<?php if ( 'autre' !== strtolower( $milieu ) && 'multimilieux' !== strtolower( $milieu ) ) :?>
371
															<label for="<?php echo strtolower( $milieu );?>">
372
																<input type="checkbox" id="<?php echo strtolower( $milieu );?>" name="milieu" value="<?php echo $milieu;?>" class="<?php echo strtolower( $milieu );?> milieu" data-label="<?php echo $observation['milieu']; ?>" data-name="milieu">
373
																<?php echo $milieu;?>
374
															</label>
375
														<?php endif; ?>
376
													<?php endforeach; ?>
377
													<?php if ( in_array('autre', $widget['milieux'] ) ) :?>
378
														<label for="other-milieu">
379
															<input type="checkbox" id="other-milieu" name="milieu" value="other" class="other milieu" data-label="<?php echo $observation['milieu']; ?>" data-element="checkboxes" data-name="milieu">
380
															Autre
381
														</label>
382
													<?php endif; ?>
383
												</div>
384
											</div>
385
										</div>
386
									<?php else : ?>
387
										<div class="">
388
											<label for="milieu" class="col-sm-8">
389
												<i class="fa fa-street-view" aria-hidden="true"></i>
390
												<?php echo $observation['milieu']; ?>
391
											</label>
392
											<div class="col-sm-8 mb-3">
393
												<div class="select-wrapper add-field-select">
394
													<select id="milieu" class="form-control milieu select custom-select has-tooltip mb-2" data-toggle="tooltip" title="<?php echo $observation['liste-milieu-title']; ?>" data-name="milieu" data-label="milieu">
395
														<option class="choisir" value="" selected hidden><?php echo $general['choisir']; ?></option>
396
														<?php foreach ( $widget['milieux'] as $milieu ) :?>
397
															<?php if ( 'autre' !== strtolower( $milieu ) && 'multimilieux' !== strtolower( $milieu ) ) :?>
398
																<option value="<?php echo $milieu; ?>" data-name="milieu"><?php echo $milieu; ?></option>
399
															<?php endif; ?>
400
														<?php endforeach; ?>
401
														<?php if ( in_array('autre', $widget['milieux'] ) ) :?>
402
															<option id="other-milieu" class="other form-control is-select" value="other" data-element="select" data-name="milieu"><?php echo $milieu; ?></option>
403
														<?php endif; ?>
404
													</select>
405
												</div>
406
											</div>
407
										</div>
408
									<?php endif; ?>
409
								<?php else : ?>
410
									<div class="">
411
										<label for="milieu" class="col-sm-8">
412
											<i class="fa fa-street-view" aria-hidden="true"></i>
413
											<?php echo $observation['milieu']; ?>
414
										</label>
415
										<div class="col-sm-8 mb-3">
416
											<input id="milieu" name="milieu" class="form-control has-tooltip" data-toggle="tooltip" type="text" placeholder="<?php echo $observation['milieu-ph']; ?>" title="<?php echo $observation['milieu-title']; ?>">
417
										</div>
418
									</div>
419
								<?php endif; ?><!-- fin choix milieu(x) -->
420
								<div class="">
421
									<label for="notes" class="col-sm-8">
422
										<i class="fa fa-pen" aria-hidden="true"></i>
423
										<?php echo $observation['notes']; ?>
424
									</label>
425
									<div class="col-sm-8 mb-3">
426
										<textarea id="notes" form="form-observation" class="col-md-12 has-tooltip" data-toggle="tooltip" rows="7" name="notes" placeholder="<?php echo $observation['notes_ph']; ?>" title="<?php echo $observation['notes-title']; ?>"></textarea>
427
									</div>
428
								</div>
429
 
430
							</div>
431
						</div>
432
					</form>
433
 
434
					<!-- Messages d'erreur du formulaire-->
435
					<div class="zone-alerte">
436
						<div id="dialogue-geoloc-ko" class="alert alert-warning alert-block hidden">
437
							<a class="close">×</a>
438
							<h4 class="alert-heading"><?php echo $observation['alertgk-title']; ?></h4>
439
							<p><?php echo $observation['alertgk']; ?></p>
440
						</div>
441
						<div id="dialogue-taxon-or-image" class="alert alert-warning alert-block hidden">
442
							<a class="close">×</a>
443
							<h4 class="alert-heading"><?php echo $observation['alert-img-tax-title']; ?></h4>
444
							<p><?php echo $observation['alert-img-tax']; ?></p>
445
						</div>
446
					</div>
447
 
448
					<!-- Champs supplémentaires -->
449
					<?php if ( isset($widget['chpSupp'] ) && 0 < count( (array) $widget['chpSupp'] ) ) : ?>
450
						<form id="form-supp"  class="bloc-top" role="form" autocomplete="on">
451
							<h2><?php echo $chpsupp['titre']; ?></h2>
452
							<div id="zone-supp" class="row">
453
 
454
								<?php foreach( $widget['chpSupp'][ $widget['projet'] ]['champs-supp'] as $champ ) : ?>
455
									<?php
456
										$min         = ( isset( $champ['fieldValues']['min'] ) )? ' min="' . $champ['fieldValues']['min'] . '"':'';
457
										$max         = ( isset( $champ['fieldValues']['max'] ) )? ' max="' . $champ['fieldValues']['max'] . '"':'';
458
										$step        = ( isset( $champ['fieldValues']['step'] ) )? ' step="' . $champ['fieldValues']['step'] . '"':'';
459
										$default     = ( isset( $champ['fieldValues']['default'] ) )? ' value="' . $champ['fieldValues']['default'] . '" data-default="' . $champ['fieldValues']['default'] . '"' :'';
460
										$description = ( isset( $champ['description'] ) )? ' data-toggle="tooltip" title="' . $champ['description'] . '"':'';
461
										$placeholder = ( isset( $champ['fieldValues']['placeholder'] ) )? ' placeholder="' . $champ['fieldValues']['placeholder'] . '"':'';
462
										$required    = '';
463
										$mandatory   = '';
464
										$pattern     = '';
465
										$obs_radio   = '';
466
										$help        = '';
467
										$help_button = '';
468
 
469
										if( $champ['help'] ) {
470
											$help = ' and-help';
471
											$help_button = ' <div class="help-button help-' . $champ['key'] . ' btn btn-outline-info btn-sm border-0" data-key="' . $champ['key'] . '" data-name="' . $champ['name'] . '" data-mime-type="' . $champ['help'] . '"><i class="fas fa-info-circle"></i></div>';
472
										}
473
 
474
										if( $champ['mandatory'] ) {
475
											// Attr required
476
											$required  = ' required';
477
											// class="obligatoire"
478
											$mandatory = ' obligatoire';
479
										}?>
480
											<div class="col-md-6">
481
										<?php
482
										switch( $champ['element'] ) {
483
											case 'radio':
484
											case 'checkbox': ?>
485
												<div class="control-group <?php echo $champ['element']; ?> mb-3"<?php echo $required; ?> data-name="<?php echo $champ['key']; ?>[]">
486
													<div class="col-sm-8 list-label<?php echo $help . $mandatory; ?>">
487
														<?php echo $champ['name'] . $help_button; ?>
488
													</div>
489
													<div class="col-sm-8 has-tooltip" <?php echo $description; ?>>
490
 
491
														<?php foreach ( $champ['fieldValues']['listValue'] as $i => $list_value_array ) : ?>
492
 
493
																<?php
494
																	$checked = '';
495
																	if ( '#' === substr( $list_value_array[0], -1 ) ) :
496
																		$checked = ' checked';
497
																		$list_value_array[0] = substr( $list_value_array[0], 0, -1 );
498
																	endif;
499
																?>
500
 
501
																<?php if( 'other' !== $list_value_array ) : ?>
502
																	<label for="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>" class="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>">
503
																		<input type="<?php echo $champ['element']; ?>" id="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>" name="<?php echo $champ['key']; ?>[]" value="<?php echo $list_value_array[0]; ?>"<?php echo $checked; ?> class="<?php echo $champ['fieldValues']['cleanListValue'][$i] . ' ' . $champ['key']; ?>" data-label="<?php echo $champ['name']; ?>" data-name="<?php echo $champ['key']; ?>">
504
																		<?php echo ( '' !== $list_value_array[1] ) ? ucfirst($list_value_array[1]) : ucfirst($list_value_array[0]); ?>
505
																	</label>
506
																<?php else : ?>
507
																	<label for="other-<?php echo $champ['key']; ?>">
508
																		<input type="<?php echo $champ['element']; ?>" id="other-<?php echo $champ['key']; ?>" name="<?php echo $champ['key']; ?>[]" value="other" class="other <?php echo $champ['key']; ?>" data-label="<?php echo $champ['name']; ?>" data-element="<?php echo $champ['element']; ?>" data-name="<?php echo $champ['key']; ?>">
509
																		Autre
510
																	</label>
511
																<?php endif; ?>
512
 
513
														<?php endforeach; ?>
514
 
515
													</div>
516
												</div>
517
											<?php break;
518
 
519
											case 'list-checkbox': ?>
520
												<div class="multiselect <?php echo $champ['element'] . $help; ?>">
521
													<label class="col-sm-8<?php echo $mandatory; ?>" title="<?php echo $chpsupp['select-checkboxes-texte'];?>">
522
														<?php echo $champ['name'] . $help_button; ?>
523
													</label>
524
													<div class="control-group col-sm-8 mb-3 has-tooltip" <?php echo $description; ?>>
525
														<div class="selectBox">
526
															<select class="form-control list-checkbox custom-select" id="list-checkbox-<?php echo $champ['key']; ?>">
527
																<option><?php echo $chpsupp['select-checkboxes-texte'];?></option>
528
															</select>
529
															<div class="overSelect"></div>
530
														</div>
531
														<div class="checkboxes hidden" <?php echo $required; ?> data-name="<?php echo $champ['key']; ?>[]">
532
															<?php foreach ( $champ['fieldValues']['listValue'] as $i => $list_value_array ) : ?>
533
 
534
																<?php
535
																	$checked = '';
536
																	if ( '#' === substr( $list_value_array[0], -1 ) ) :
537
																		$checked = ' checked';
538
																		$list_value_array[0] = substr( $list_value_array[0], 0, -1 );
539
																	endif;
540
																?>
541
 
542
																<?php if( 'other' !== $list_value_array ) : ?>
543
																	<label for="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>">
544
																		<input type="checkbox" id="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>" name="<?php echo $champ['key']; ?>[]" value="<?php echo $list_value_array[0]; ?>"<?php echo $checked; ?> class="<?php echo $champ['fieldValues']['cleanListValue'][$i] . ' ' . $champ['key']; ?>" data-label="<?php echo $champ['name']; ?>" data-name="<?php echo $champ['key']; ?>">
545
																		<?php echo ( '' !== $list_value_array[1] ) ? ucfirst($list_value_array[1]) : ucfirst($list_value_array[0]); ?>
546
																	</label>
547
																<?php else : ?>
548
																	<label for="other-<?php echo $champ['key']; ?>">
549
																		<input type="checkbox" id="other-<?php echo $champ['key']; ?>" name="<?php echo $champ['key']; ?>[]" value="other" class="other <?php echo $champ['key']; ?>" data-label="<?php echo $champ['name']; ?>" data-element="checkboxes" data-name="<?php echo $champ['key']; ?>">
550
																		Autre
551
																	</label>
552
																<?php endif; ?>
553
 
554
															<?php endforeach; ?>
555
 
556
														</div>
557
													</div>
558
												</div>
559
											<?php break;
560
 
561
											case 'select': ?>
562
												<div class="control-group mb-3">
563
													<label for="<?php echo $champ['key']; ?>" class="col-sm-8<?php echo $mandatory; ?>"><?php echo $champ['name'] . $help_button; ?></label>
564
													<div class="col-sm-8 mb-3">
565
														<div class="select-wrapper add-field-select <?php echo $help; ?>">
566
															<select id="<?php echo $champ['key']; ?>" class="<?php echo $champ['key'] . ' ' . $champ['element']; ?> form-control has-tooltip custom-select mb-2"<?php echo $required; ?> data-label="<?php echo $champ['name']; ?>" data-name="<?php echo $champ['key']; ?>" <?php echo $description; ?>>
567
 
568
																<?php foreach ( $champ['fieldValues']['listValue'] as $list_value_array ) : ?>
569
 
570
																	<?php
571
																		$selected = '';
572
																		if ( '#' === substr( $list_value_array[0], -1 ) ) :
573
																			$selected = ' selected="selected"';
574
																			$list_value_array[0] = substr( $list_value_array[0], 0, -1 );
575
																		endif;
576
																	?>
577
 
578
																	<?php if( 'other' !== $list_value_array ) : ?>
579
																		<option value="<?php echo $list_value_array[0]; ?>"<?php echo $selected; ?> data-name="<?php echo $champ['key']; ?>">
580
																			<?php echo ( '' !== $list_value_array[1] ) ? ucfirst($list_value_array[1]) : ucfirst($list_value_array[0]); ?>
581
																		</option>
582
																	<?php else : ?>
583
																		<option id="other-<?php echo $champ['key']; ?>" class="other form-control is-select" value="other" data-element="<?php echo $champ['element']; ?>" data-name="<?php echo $champ['key']; ?>">Autre</option>
584
																	<?php endif; ?>
585
																<?php endforeach; ?>
586
															</select>
587
														</div>
588
													</div>
589
												</div>
590
											<?php break;
591
 
592
											case 'textarea': ?>
593
												<div class="control-group">
594
													<label for="<?php echo $champ['key']; ?>" class="col-sm-8<?php echo $help . $mandatory; ?> " ><?php echo $champ['name'] . $help_button; ?></label>
595
													<div class="col-sm-8 mb-3">
596
														<textarea type="<?php echo $champ['element']; ?>" id="<?php echo $champ['key']; ?>" name="<?php echo $champ['key']; ?>" class="<?php echo $champ['key'] . $help; ?> form-control has-tooltip" <?php echo $description . $placeholder . $required; ?> data-label="<?php echo $champ['name']; ?>"></textarea>
597
													</div>
598
												</div>
599
											<?php break;
600
 
601
											case 'range': ?>
602
												<div class="control-group">
603
													<label for="<?php echo $champ['key']; ?>" class="col-sm-8<?php echo $help . $mandatory; ?>"><?php echo $champ['name'] . $help_button; ?></label>
604
													<div class="col-sm-8 mb-3 row">
605
														<?php
606
															$div_range_min_max = '';
607
 
608
															if ( isset( $champ['fieldValues']['min'] ) )  {
609
																$div_range_min_max =
610
																	"<p class=\"col-2 range-values text-center font-weight-bold\">".
611
																		"Min " . $champ['fieldValues']['min'] .
612
																	"</p>";
613
															}
614
 
615
															$div_range_min_max .= '<div class="range-live-value range-values text-center font-weight-bold col-';
616
 
617
															if ( isset( $champ['fieldValues']['min'] ) && isset( $champ['fieldValues']['max'] ) ) {
618
																$div_range_min_max .= '8';
619
															} elseif ( isset( $champ['fieldValues']['min'] ) || isset( $champ['fieldValues']['max'] ) ) {
620
																$div_range_min_max .= '10';
621
															} else {
622
																$div_range_min_max .= '12';
623
															}
624
 
625
															$div_range_min_max .= '" onload="this.innerText = document.getElementById(&apos;ajouter-obs&apos;).value"></div>';
626
 
627
															if( isset( $champ['fieldValues']['max'] ) ) {
628
																$div_range_min_max .=
629
																	"<p class=\"col-2 range-values text-center font-weight-bold\">".
630
																		"Max " . $champ['fieldValues']['max'] .
631
																	"</p>";
632
															}
633
 
634
															echo $div_range_min_max;
635
														?>
636
														<input type="<?php echo $champ['element']; ?>" name="<?php echo $champ['key']; ?>" class="pl-3 custom-range <?php echo $champ['key'] . $help; ?> form-control has-tooltip" <?php echo $description . $placeholder . $step . $default . $min . $max . $required; ?> data-label="<?php echo $champ['name']; ?>">
637
													</div>
638
												</div>
639
												<?php break;
640
 
641
											case 'number':
642
											case 'date': ?>
643
												<div class="control-group">
644
													<label for="<?php echo $champ['key']; ?>" class="col-sm-8<?php echo $mandatory; ?>"><?php echo $champ['name'] . $help_button; ?></label>
645
													<div class="col-sm-8 mb-3">
646
														<input type="<?php echo $champ['element']; ?>" name="<?php echo $champ['key']; ?>" class="<?php echo $champ['key'] . $help; ?> form-control has-tooltip"<?php echo  $pattern . $description . $placeholder . $step . $default . $min . $max . $required; ?> data-label="<?php echo $champ['name']; ?>">
647
													</div>
648
												</div>
649
												<?php break;
650
 
651
											case 'text' :
652
											case 'email':
653
											default: ?>
654
												<div class="control-group">
655
													<label for="<?php echo $champ['key']; ?>" class="col-sm-8<?php echo $mandatory; ?>"><?php echo $champ['name'] . $help_button; ?></label>
656
													<div class="col-sm-8 mb-3">
657
														<input type="<?php echo $champ['element']; ?>" name="<?php echo $champ['key']; ?>" class="<?php echo $champ['key'] . $help; ?> form-control has-tooltip" <?php echo $description . $placeholder . $required; ?> data-label="<?php echo $champ['name']; ?>">
658
													</div>
659
												</div>
660
											<?php break;
661
										}
662
									?>
663
										</div>
664
								<?php endforeach; ?>
665
							</div>
666
						</form>
667
					<?php endif; ?><!-- Fin champs supplémentaires -->
668
 
669
					<form id="form-upload" class="form-horizontal bloc-top" action="<?php echo $url_ws_upload ?>" method="post" enctype="multipart/form-data">
670
						<h2><?php echo $image['titre']; ?></h2>
671
						<p id="miniature-info">
672
							<?php echo $image['aide']; ?>
673
						</p>
674
						<div id ="photos-conteneur" class="control-group col-sm-12">
675
							<div>
676
								<label for="fichier" class="label-file btn btn-large btn-info mb-3">
677
									<span class="label-text"><i class="fas fa-download"></i> <?php echo $image['ajouter']; ?></span>
678
									<input type="file" id="fichier" name="fichier" class="input-file" accept="image/jpeg" multiple>
679
									<input type="hidden" name="MAX_FILE_SIZE" value="5242880">
680
								</label>
681
							</div>
682
							<span for="fichier" class="error" style="display: none;"><?php echo $observation['error-taxon'];?></span>
683
 
684
							<div id="miniatures"></div>
685
							<p class="miniature-msg" class="span12">&nbsp;</p>
686
						</div>
687
					</form>
688
 
689
					<div id="image" class="row"></div>
690
				</div>
691
 
692
				<!-- Bouton cr&ation d'une obs -->
693
				<div class="row mb-3">
694
					<div class="centre" title="<?php echo $resume['creer-title']; ?>">
695
						<button id="ajouter-obs" class="btn btn-success"><i class="fas fa-check-square"></i> <?php echo $resume['creer']; ?></button>
696
					</div>
697
				</div>
698
 
699
				<!-- Messages d'erreur du formulaire-->
700
				<div class="row">
701
					<div class="zone-alerte">
702
						<div id="message-chargement" class="alert alert-secondary alert-block hidden">
703
							<a class="close">×</a>
704
							<h4 class="alert-heading"><?php echo $resume['alertchargt']; ?></h4>
705
							<p><?php echo $resume['alertchargt-desc']; ?></p>
706
						</div>
707
					</div>
708
					<div class="zone-alerte">
709
						<div id="dialogue-bloquer-creer-obs" class="alert alert-warning alert-block hidden">
710
							<a class="close">×</a>
711
							<h4 class="alert-heading"><?php echo $resume['alert10max']; ?></h4>
712
							<p><?php echo $resume['alert10max-desc']; ?></p>
713
						</div>
714
					</div>
715
					<div class="zone-alerte">
716
						<div id="dialogue-form-invalide" class="alert alert-warning alert-block hidden">
717
							<a class="close">×</a>
718
							<h4 class="alert-heading"><?php echo $resume['alertchp']; ?></h4>
719
							<p><?php echo $resume['alertchp-desc']; ?></p>
720
						</div>
721
					</div>
722
				</div>
723
 
724
				<!-- Affiche le tableau récapitualif des observations ajoutées -->
725
				<div id="zone-liste-obs" class="bloc-top hidden">
726
					<div class="alert alert-info">
727
						<h2 class="transmission-title"><strong><?php echo $resume['titre']; ?> <span class="obs-nbre badge badge-info">0</span></strong></h2>
728
						<button id="transmettre-obs" class="btn btn-success droite" disabled="disabled"
729
							title="<?php echo $resume['trans-title']; ?>" type="button">
730
							<?php echo $resume['trans']; ?>
731
						</button>
732
					</div>
733
					<!-- chargement -->
734
					<div id="chargement" class="modal-fenetre hidden">
735
						<div id="chargement-centrage" class="modal-contenu">
736
							<div class="progress active">
737
								<div id="barre-progression-upload" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="10" style="">
738
										<span class="sr-only">0/10 <?php echo $resume['nbobs']; ?></span>
739
									</div>
740
							</div>
741
							<p id="chargement-txt"><?php echo $resume['transencours']; ?></p>
742
						</div>
743
					</div>
744
					<div id="liste-obs" ></div>
745
					<div class="row">
746
						<div class="zone-alerte">
747
							<div id="dialogue-zero-obs" class="alert alert-block hidden">
748
								<a class="close">×</a>
749
								<h4 class="alert-heading"><?php echo $resume['alert0obs']; ?></h4>
750
								<p><?php echo $resume['alert0obs-desc']; ?></p>
751
							</div>
752
							<div id="dialogue-obs-transaction-ok" class="alert alert-success alert-block hidden">
753
								<a class="close">×</a>
754
								<h4 class="alert-heading"><?php echo $resume['info-trans']; ?></h4>
755
								<div class="alert-txt"></div>
756
							</div>
757
							<div id="dialogue-obs-transaction-ko" class="alert alert-error alert-block hidden">
758
								<a class="close">×</a>
759
								<h4 class="alert-heading"><?php echo $resume['alerttrans']; ?></h4>
760
								<div class="alert-txt"></div>
761
							</div>
762
						</div>
763
					</div>
764
				</div>
765
 
766
				<!-- Templates HTML -->
767
				<div id="tpl-transmission-ok" class="hidden">
768
					<p class="msg"><?php echo $resume['transok']; ?></p>
769
				</div>
770
				<div id="tpl-transmission-ko" class="hidden">
3709 idir 771
					<p class="msg"><?php echo $resume['transkomsg']; ?><a href="<?php echo $url_remarques; ?>?lang=fr&service=cel&pageSource=<?php echo urlencode( 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] ); ?>" target="_blank" onclick="javascript: window.open( this.getAttribute( 'href' ), 'Tela Botanica - Remarques', config = 'height=700, width=640, scrollbars=yes, resizable=yes' ); return false;"><?php echo $resume['transkolien']; ?></a>.</p>
3638 delphine 772
				</div>
773
			</div>
774
		</div>
775
 
776
		<!-- modale -->
777
		<div id="fenetre-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="fenetre-modal-label" style="display: none;" aria-hidden="true">
778
			<div class="modal-dialog modal-dialog-centered" role="document">
779
				<div class="modal-content">
780
					<div class="modal-header">
781
						<h5 class="modal-title" id="fenetre-modal-label"></h5>
782
						<button type="button" class="close" data-dismiss="modal" aria-label="Close">
783
							<span aria-hidden="true">&times;</span>
784
						</button>
785
					</div>
786
					<div class="modal-body" id="print_content"></div>
787
					<div class="modal-footer"></div>
788
				</div>
789
			</div>
790
		</div>
791
		<!-- carto -->
792
		<script type="text/javascript" src="<?php echo $url_base; ?>js/tb-geoloc/tb-geoloc-lib-app.js"></script>
793
		<!-- Jquery -->
794
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/1.11.1/jquery-1.11.1.min.js"></script>
795
		<!-- Jquery UI : nécessaire pour le minicalendrier et l'auto-complétion -->
796
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/jquery-ui/1.11.0/js/jquery-ui.min.js"></script>
797
		<!-- <script type="text/javascript" src="https://resources.tela-botanica.org/jquery/jquery-ui/1.11.0/js/datepicker-fr.js"></script> -->
798
		<!-- Jquery Plugins -->
799
		<!-- Jquery Validate : nécessaire pour la validation des formulaires -->
800
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/validate/1.11.1/jquery.validate.min.js"></script>
801
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/validate/1.11.1/additional-methods.min.js"></script>
802
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/validate/1.11.1/messages_fr.js"></script>
803
		<!-- Jquery Form :nécessaire pour l'upload des images -->
804
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/form/3.51/jquery.form.min.js"></script>
805
		<!-- Bootstrap -->
806
		<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
807
		<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
808
		<!-- Connexion, bloc de prévisualisation, date -->
809
		<script type="text/javascript" src="<?php echo $url_base; ?>js/Utils.js"></script>
810
		<script type="text/javascript" src="<?php echo $url_base; ?>js/WidgetsSaisiesCommun.js"></script>
811
		<script type="text/javascript" src="<?php echo $url_base; ?>js/WidgetSaisie.js"></script>
812
		<script type="text/javascript">
813
			//<![CDATA[
814
				const NBRE_ELTS_AUTOCOMP = 20;
815
				const OBS_MAX_NBRE       = 10;
816
				const DUREE_MESSAGE      = 1000;
817
 
818
				var widgetProp = {
819
					// url jusqu'à "/widget:cel:"
820
					'urlWidgets'                        : "<?php echo $widgets_url; ?>",
821
					// module utilisé (apa,lg,streets)
822
					'projet'                            : "<?php echo $widget['projet']; ?>",
823
					// id du projet
824
					'idProjet'                          : "<?php echo $widget['id_projet']; ?>",
825
					// La présence du parametre 'debug' dans l'URL enclenche le débogage
826
					'debug'                             : <?php echo isset( $_GET['debug'] ) ? 'true' : 'false'; ?>,
827
					// La présence du parametre 'html5' dans l'URL enclenche les fonctions avancées HTML5
828
					'html5'                             : <?php echo isset($_GET['html5']) ? 'true' : 'false'; ?>,
829
					// Mot-clé du widget/projet
830
					'tagsMotsCles'                      : "<?php echo $widget['motscles']; ?>",
831
					// Mots-clés à ajouter aux images
832
					'tagImg'                            : "<?php echo isset($widget['tag-img']) ? $widget['tag-img'] : ''; ?>",
833
					// Mots-clés à ajouter aux observations
834
					'tagObs'                            : "<?php echo isset($widget['tag-obs']) ? $widget['tag-obs'] : ''; ?>",
835
					// Précharger le formulaire avec les infos d'une observation
836
					'obsId'                             : "<?php echo isset($_GET['id-obs']) ? $_GET['id-obs'] : ''; ?>",
837
					// URL du web service réalisant l'insertion des données dans la base du CEL.
838
					'serviceSaisieUrl'                  : "<?php echo $url_ws_saisie; ?>",
839
					// URL du web service permettant de récupérer les infos d'une observation du CEL.
840
					'serviceObsUrl'                     : "<?php echo $url_ws_obs; ?>",
841
					// langue
842
					'langue'                            : "<?php echo $widget['langue']; ?>",
843
					// Squelette d'URL du web service de l'annuaire.
844
					'serviceAnnuaireIdUrl'              : "<?php echo $url_ws_annuaire; ?>",
845
					// mode : prod / beta / local
846
					'mode'                              : "<?php echo $conf_mode; ?>",
847
					// URL de l'icône du chargement en cours d'une image
848
					'chargementImageIconeUrl'           : "<?php echo $url_base; ?>img/icones/chargement.gif",
849
					// URL de l'icône pour une photo manquante
850
					'pasDePhotoIconeUrl'                : "<?php echo $url_base; ?>img/icones/pasdephoto.png",
851
					// Code du référentiel utilisé pour les nom scientifiques.
852
					'nomSciReferentiel'                 : "<?php echo ( !empty( $widget['referentiel'] ) ) ? strtolower( $widget['referentiel'] ) : 'bdtfxr'; ?>",
853
					// Indication de la présence d'une espèce imposée
854
					'especeImposee'                     : "<?php echo $widget['especes']['espece_imposee']; ?>",
855
					// Tableau d'informations sur l'espèce imposée
856
					'infosEspeceImposee'                : "<?php echo $widget['especes']['infos_espece']; ?>",
857
					// Indication de la présence d'un référentiel imposé
858
					'referentielImpose'                 : "<?php echo ( !empty( $widget['referentiel'] ) ) ? strtolower( $widget['referentiel'] ) : 'bdtfxr'; ?>",
859
					// #taxon est une liste
860
					'isTaxonListe'                      : <?php echo ( isset( $widget['especes']['taxons'] ) && count( (array) $widget['especes']['taxons'] ) )? 'true' : 'false' ; ?>,
861
					// Nombre d'élément dans les listes d'auto-complétion
862
					'autocompletionElementsNbre'        : NBRE_ELTS_AUTOCOMP,
863
					// URL du web service permettant l'auto-complétion des noms scientifiques
864
					'serviceAutocompletionNomSciUrl'    : "<?php echo $widget['especes']['url_ws_autocompletion_ns']; ?>?"+
865
						"masque={masque}&"+
866
						"recherche=etendue&"+
867
						"retour.champs=famille,nom_retenu,nom_retenu_complet,num_taxonomique,nom_retenu.id&"+
3680 delphine 868
						"ns.structure=au,an&"+
3638 delphine 869
						"navigation.limite=" + NBRE_ELTS_AUTOCOMP,
870
					// Squelette d'URL du web service permettant l'auto-complétion des noms scientifiques
871
					'serviceAutocompletionNomSciUrlTpl' : "<?php echo $widget['especes']['url_ws_autocompletion_ns_tpl']; ?>?"+
872
						"masque={masque}&"+
873
						"recherche=etendue&"+
874
						"retour.champs=famille,nom_retenu,nom_retenu_complet,num_taxonomique,nom_retenu.id&"+
875
						"retour.tri=alpharet&"+ // tri "à la CeL"
3680 delphine 876
						"ns.structure=au,an&"+
3638 delphine 877
						"navigation.limite=" + NBRE_ELTS_AUTOCOMP,
878
					// Nombre d'observations max autorisé avant transmission
879
					'obsMaxNbre'                        : OBS_MAX_NBRE,
880
					// Durée d'affichage en milliseconde des messages d'informations
881
					'dureeMessage'                      : DUREE_MESSAGE,
882
					// Squelette d'URL du web service d'eFlore fournissant les noms de communes.
883
					'serviceNomCommuneUrl'              : "https://api.tela-botanica.org/service:eflore:0.1/osm/nom-commune?lon={lon}&lat={lat}",
884
					// Squelette d'URL du web service d'eFlore fournissant les noms de communes hors de France (localisation approximative).
885
					'serviceNomCommuneUrlAlt'           : "https://api.tela-botanica.org/service:eflore:0.1/wikipedia/nom-commune?lon={lon}&lat={lat}&nbre=1"
886
				};
887
 
888
				$( document ).ready( function() {
889
					widget = new WidgetSaisie(widgetProp);
890
					widget.init();
891
					// Fonctions de Style et Affichage des éléments "spéciaux"
892
					utils.init();
893
				});
894
			//]]>
895
		</script>
896
		<!-- Barre de navigation -->
897
		<?php if ( $bar ): ?>
898
			<script src="<?php echo $url_script_navigation; ?>"></script>
899
		<?php endif; ?>
900
	</body>
901
</html>