Subversion Repositories eFlore/Applications.cel

Rev

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