Subversion Repositories eFlore/Applications.cel

Rev

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

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