Subversion Repositories eFlore/Applications.cel

Rev

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