Subversion Repositories eFlore/Applications.cel

Rev

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