Subversion Repositories eFlore/Applications.cel

Rev

Rev 3248 | Rev 3257 | 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>
3248 idir 271
										<?php echo $observation['espece']; ?><?php if ( $widget['referentiel'] !== '' && $widget['referentiel'] !== NULL ) echo " (" . $widget['referentiel'] . ")"; ?>
3239 idir 272
									</label>
273
									<div class="col-sm-8 mb-3">
3249 idir 274
										<input id="taxon" name="taxon" class="form-control" type="text">
3239 idir 275
									</div>
3228 delphine 276
								</div>
3208 idir 277
 
3239 idir 278
								<div class="control-group">
279
									<label for="certitude" class="col-sm-8 obligatoire" title="">
280
										<i class="fa fa-question" aria-hidden="true"></i>
3248 idir 281
										<?php echo $observation['certitude']; ?>
3239 idir 282
									</label>
283
									<div class="col-sm-8 mb-3">
284
										<select id="certitude" name="certitude" class="form-control">
3248 idir 285
											<option value="aDeterminer" ><?php echo $observation['certADet']; ?></option>
286
											<option value="douteuse" ><?php echo $observation['certDout']; ?></option>
287
											<option value="certaine" selected="selected" ><?php echo $observation['certCert']; ?></option>
3239 idir 288
										</select>
289
									</div>
290
								</div>
3240 idir 291
								<div class="">
3243 idir 292
									<label for="milieu" class="col-sm-8">
293
										<i class="fa fa-street-view" aria-hidden="true"></i>
3248 idir 294
										<?php echo $observation['milieu']; ?>
3243 idir 295
									</label>
296
									<div class="col-sm-8 mb-3">
297
										<?php if ( 0 < count( (array) $widget['milieux'] ) ) :?>
298
											<select id="milieu" class="form-control" >
299
												<?php foreach ( $widget['milieux'] as $milieu ) :?>
3248 idir 300
													<option value="<?php echo $milieu; ?>"><?php echo $milieu; ?></option>
3243 idir 301
												<?php endforeach; ?>
302
											</select>
303
										<?php else : ?>
3248 idir 304
											<input id="milieu" name="milieu" class="form-control" type="text" placeholder="<?php echo $observation['milieu-ph']; ?>">
3243 idir 305
										<?php endif; ?>
306
									</div>
307
								</div>
308
								<div class="">
3239 idir 309
                                    <label for="notes" class="col-sm-8" title="">
310
                                        <i class="fa fa-pen" aria-hidden="true"></i>
3248 idir 311
                                        <?php echo $observation['notes']; ?>
3239 idir 312
                                    </label>
313
                                    <div class="col-sm-8 mb-3">
3248 idir 314
                                        <textarea id="notes" form="form-observation" class="col-md-12" rows="7" name="notes" placeholder="<?php echo $observation['notes_ph']; ?>"></textarea>
3239 idir 315
                                    </div>
316
                                </div>
3208 idir 317
 
3230 delphine 318
							</div>
319
						</div>
3239 idir 320
					</form>
3208 idir 321
 
3239 idir 322
					<!-- Champs supplémentaires -->
323
					<?php if ( isset($widget['chpSupp'] ) && 0 < count( (array) $widget['chpSupp'] ) ) : ?>
324
						<form id="form-supp"  class="bloc-top" role="form" autocomplete="on">
3248 idir 325
							<h2><?php echo $chpsupp['titre']; ?></h2>
3239 idir 326
							<div id="zone-supp" class="row">
327
								<div class="col-md-6">
3208 idir 328
 
3239 idir 329
									<?php foreach( $widget['chpSupp'][ $widget['projet'] ]['champs-supp'] as $champ ) : ?>
330
										<?php
3249 idir 331
											$min         = ( isset( $champ['fieldValues']['min'] ) )? ' min="' . $champ['fieldValues']['min'] . '"':'';
332
											$max         = ( isset( $champ['fieldValues']['max'] ) )? ' max="' . $champ['fieldValues']['max'] . '"':'';
333
											$step        = ( isset( $champ['fieldValues']['step'] ) )? ' step="' . $champ['fieldValues']['step'] . '"':'';
334
											$default     = ( isset( $champ['fieldValues']['default'] ) )? ' value="' . $champ['fieldValues']['default'] . '"':'';
335
											$description = ( isset( $champ['description'] ) )? ' title="' . $champ['description'] . '"':'';
336
											$placeholder = ( isset( $champ['fieldValues']['placeholder'] ) )? ' placeholder="' . $champ['fieldValues']['placeholder'] . '"':'';
3239 idir 337
											$required    = '';
338
											$mandatory   = '';
339
											$pattern     = '';
340
											$obs_radio   = '';
341
											$help        = '';
342
											$help_button = '';
3208 idir 343
 
3239 idir 344
											if( $champ['help'] ) {
345
												$help = ' and-help';
346
												$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>';
347
											}
3208 idir 348
 
3239 idir 349
											if( $champ['mandatory'] ) {
350
												// Attr required
351
												$required  = ' required';
352
												// class="obligatoire"
353
												$mandatory = ' obligatoire';
354
											}
3208 idir 355
 
3239 idir 356
											switch( $champ['element'] ) {
357
												case 'radio':
358
												case 'checkbox': ?>
3248 idir 359
													<div class="control-group <?php echo $champ['element']; ?> mb-3"<?php echo $description . $required; ?>>
3239 idir 360
														<div class="col-sm-8 list-label<?php echo $help . $mandatory; ?>">
3248 idir 361
															<?php echo $champ['name'] . $help_button; ?>
3239 idir 362
														</div>
363
														<div class="col-sm-8">
3217 idir 364
 
3239 idir 365
															<?php foreach ( $champ['fieldValues']['listValue'] as $i => $list_value ) : ?>
3208 idir 366
 
3239 idir 367
																	<?php
368
																		$checked = '';
369
																		if ( '#' === substr( $list_value, -1 ) ) :
370
																			$checked = ' checked';
371
																			$list_value = substr( $list_value, 0, -1 );
372
																		endif;
373
																	?>
3208 idir 374
 
3239 idir 375
																	<?php if( 'other' !== $list_value ) : ?>
376
																		<label for="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>" class="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>">
3248 idir 377
																			<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']; ?>">
378
																			<?php echo $list_value; ?>
3239 idir 379
																		</label>
380
																	<?php else : ?>
3248 idir 381
																		<label for="other-<?php echo $champ['key']; ?>">
382
																			<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 383
																			Autre
384
																		</label>
385
																	<?php endif; ?>
3208 idir 386
 
3239 idir 387
															<?php endforeach; ?>
3208 idir 388
 
3239 idir 389
														</div>
390
													</div>
391
												<?php break;
3208 idir 392
 
3239 idir 393
												case 'list-checkbox': ?>
394
													<div class="multiselect <?php echo $champ['element'] . $help; ?>">
3248 idir 395
														<label class="col-sm-8<?php echo $mandatory; ?>" title="<?php echo $chpsupp['select-checkboxes-texte'];?>"><?php echo $champ['name'] . $help_button; ?></label>
3239 idir 396
														<div class="control-group col-sm-8 mb-3">
397
															<div class="selectBox">
3248 idir 398
																<select class="form-control list-checkbox" id="list-checkbox-<?php echo $champ['key']; ?>"<?php echo $description . $required; ?> class="form-control">
399
																	<option><?php echo $chpsupp['select-checkboxes-texte'];?></option>
3239 idir 400
																</select>
401
																<div class="overSelect"></div>
402
															</div>
403
															<div class="checkboxes hidden">
404
																<?php foreach ( $champ['fieldValues']['listValue'] as $i => $list_value ) : ?>
3208 idir 405
 
3239 idir 406
																	<?php
407
																		$checked = '';
408
																		if ( '#' === substr( $list_value, -1 ) ) :
409
																			$checked = ' checked';
410
																			$list_value = substr( $list_value, 0, -1 );
411
																		endif;
412
																	?>
3208 idir 413
 
3239 idir 414
																	<?php if( 'other' !== $list_value ) : ?>
415
																		<label for="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>">
3248 idir 416
																			<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']; ?>">
417
																			<?php echo $list_value; ?>
3239 idir 418
																		</label>
419
																	<?php else : ?>
3248 idir 420
																		<label for="other-<?php echo $champ['key']; ?>">
421
																			<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 422
																			Autre
423
																		</label>
424
																	<?php endif; ?>
3208 idir 425
 
3239 idir 426
																<?php endforeach; ?>
3208 idir 427
 
3239 idir 428
															</div>
429
														</div>
430
													</div>
431
												<?php break;
3208 idir 432
 
3239 idir 433
												case 'select': ?>
3248 idir 434
													<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 435
													<div class="champ col-sm-8 mb-3">
436
														<div class="select-wrapper add-field-select <?php echo $champ['element'] . $help; ?>">
3248 idir 437
															<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 438
 
3239 idir 439
																<?php foreach ( $champ['fieldValues']['listValue'] as $list_value ) : ?>
3208 idir 440
 
3239 idir 441
																	<?php
442
																		$selected = '';
443
																		if ( '#' === substr( $list_value, -1 ) ) :
444
																			$selected = ' selected="selected"';
445
																			$list_value = substr( $list_value, 0, -1 );
446
																		endif;
447
																	?>
3208 idir 448
 
3239 idir 449
																	<?php if( 'other' !== $list_value ) : ?>
3248 idir 450
																		<option value="<?php echo $list_value; ?>"<?php echo $selected; ?>>
3239 idir 451
																			<?php echo ucfirst( $list_value ); ?>
452
																		</option>
453
																	<?php else : ?>
3248 idir 454
																		<option class="other form-control is-select" value="other" data-element="<?php echo $champ['element']; ?>">Autre</option>
3239 idir 455
																	<?php endif; ?>
3208 idir 456
 
3239 idir 457
																<?php endforeach; ?>
3208 idir 458
 
3239 idir 459
															</select>
460
														</div>
461
													</div>
462
												<?php break;
3208 idir 463
 
3239 idir 464
												case 'textarea': ?>
465
													<div class="control-group">
3248 idir 466
														<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 467
														<div class="col-sm-8 mb-3">
3248 idir 468
															<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 469
														</div>
470
													</div>
471
												<?php break;
3208 idir 472
 
3239 idir 473
												case 'range': ?>
474
													<div class="control-group">
3248 idir 475
														<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 476
														<div class="col-sm-8 mb-3 row">
3239 idir 477
															<?php
3240 idir 478
																$div_range_min_max = '';
3208 idir 479
 
3249 idir 480
																if ( isset( $champ['fieldValues']['min'] ) )  {
3240 idir 481
																	$div_range_min_max =
482
																		"<p class=\"col-sm-2 range-values text-center font-weight-bold\">".
483
																			"Min " . $champ['fieldValues']['min'] .
484
																		"</p>";
485
																}
3208 idir 486
 
3240 idir 487
																$div_range_min_max .= '<div class="range-live-value range-values text-center font-weight-bold col-sm-';
3208 idir 488
 
3249 idir 489
																if ( isset( $champ['fieldValues']['min'] ) && isset( $champ['fieldValues']['max'] ) ) {
3240 idir 490
																	$div_range_min_max .= '8';
3249 idir 491
																} elseif ( isset( $champ['fieldValues']['min'] ) || isset( $champ['fieldValues']['max'] ) ) {
3240 idir 492
																	$div_range_min_max .= '10';
493
																} else {
494
																	$div_range_min_max .= '12';
495
																}
3208 idir 496
 
3240 idir 497
																$div_range_min_max .= '"></div>';
3208 idir 498
 
3249 idir 499
																if( isset( $champ['fieldValues']['max'] ) ) {
3240 idir 500
																	$div_range_min_max .=
501
																		"<p class=\"col-sm-2 range-values text-center font-weight-bold\">".
502
																			"Max " . $champ['fieldValues']['max'] .
503
																		"</p>";
504
																}
3208 idir 505
 
3240 idir 506
																echo $div_range_min_max;
3239 idir 507
															?>
3248 idir 508
															<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 509
														</div>
510
													</div>
511
													<?php break;
3208 idir 512
 
3239 idir 513
												case 'number':
514
												case 'date': ?>
515
													<div class="control-group">
3248 idir 516
														<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 517
														<div class="col-sm-8 mb-3">
3248 idir 518
															<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 519
														</div>
520
													</div>
521
													<?php break;
3208 idir 522
 
3239 idir 523
												case 'text' :
524
												case 'email':
525
												default: ?>
526
													<div class="control-group">
3248 idir 527
														<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 528
														<div class="col-sm-8 mb-3">
3248 idir 529
															<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 530
														</div>
531
													</div>
532
												<?php break;
533
											}
534
										?>
3208 idir 535
 
3239 idir 536
									<?php endforeach; ?>
537
								</div>
538
							</div>
539
						</form>
540
					<?php endif; ?><!-- Fin champs supplémentaires -->
3208 idir 541
 
3248 idir 542
					<form id="form-upload" class="form-horizontal bloc-top" action="<?php echo $url_ws_upload ?>" method="post" enctype="multipart/form-data">
543
						<h2><?php echo $image['titre']; ?></h2>
3239 idir 544
						<p class="miniature-info" class="discretion help-inline">
3248 idir 545
							<?php echo $image['aide']; ?>
3239 idir 546
						</p>
547
						<div id ="photos-conteneur" class="control-group">
548
							<div>
549
								<label for="fichier" class="label-file btn btn-large btn-info mb-3">
3248 idir 550
									<span class="label-text"><i class="fas fa-download"></i> <?php echo $image['ajouter']; ?></span>
3239 idir 551
									<input type="file" id="fichier" name="fichier" class="input-file" accept="image/jpeg" multiple>
552
									<input type="hidden" name="MAX_FILE_SIZE" value="5242880">
553
								</label>
554
							</div>
3208 idir 555
 
3239 idir 556
							<div id="miniatures"></div>
557
							<p class="miniature-msg" class="span12">&nbsp;</p>
558
						</div>
559
					</form>
3208 idir 560
 
3239 idir 561
					<div id="image" class="row"></div>
562
				</div>
3208 idir 563
 
3239 idir 564
				<!-- Bouton cr&ation d'une obs -->
3240 idir 565
				<div class="row mb-3">
3248 idir 566
					<div class="centre" title="<?php echo $resume['creer-title']; ?>">
567
						<button id="ajouter-obs" class="btn btn-primary"><i class="fas fa-check-square"></i> <?php echo $resume['creer']; ?></button>
3239 idir 568
					</div>
569
				</div>
3208 idir 570
 
3239 idir 571
				<!-- Messages d'erreur du formulaire-->
572
				<div class="row">
573
					<div class="zone-alerte">
574
						<div id="dialogue-bloquer-creer-obs" class="alert alert-warning alert-block hidden">
575
							<a class="close">×</a>
3248 idir 576
							<h4 class="alert-heading"><?php echo $resume['alert10max']; ?></h4>
577
							<p><?php echo $resume['alert10max-desc']; ?></p>
3239 idir 578
						</div>
579
					</div>
580
					<div class="zone-alerte">
581
						<div id="dialogue-form-invalide" class="alert alert-warning alert-block hidden">
582
							<a class="close">×</a>
3248 idir 583
							<h4 class="alert-heading"><?php echo $resume['alertchp']; ?></h4>
584
							<p><?php echo $resume['alertchp-desc']; ?></p>
3239 idir 585
						</div>
586
					</div>
587
				</div>
3208 idir 588
 
3239 idir 589
				<!-- Affiche le tableau récapitualif des observations ajoutées -->
3240 idir 590
				<div id="zone-liste-obs" class="bloc-top hidden">
3239 idir 591
					<div class="alert alert-info">
3248 idir 592
						<h2 class="transmission-title"><strong><?php echo $resume['titre']; ?> <span class="obs-nbre badge badge-info">0</span></strong></h2>
3239 idir 593
						<button id="transmettre-obs" class="btn btn-primary droite" disabled="disabled"
3248 idir 594
							title="<?php echo $resume['trans-title']; ?>" type="button">
595
							<?php echo $resume['trans']; ?>
3239 idir 596
						</button>
597
					</div>
598
					<div id="liste-obs" ></div>
599
					<div class="row">
600
						<div class="zone-alerte">
601
							<div id="dialogue-zero-obs" class="alert alert-block hidden">
602
								<a class="close">×</a>
3248 idir 603
								<h4 class="alert-heading"><?php echo $resume['alert0obs']; ?></h4>
604
								<p><?php echo $resume['alert0obs-desc']; ?></p>
3239 idir 605
							</div>
606
							<div id="dialogue-obs-transaction-ok" class="alert alert-success alert-block hidden">
607
								<a class="close">×</a>
3248 idir 608
								<h4 class="alert-heading"><?php echo $resume['info-trans']; ?></h4>
3239 idir 609
								<div class="alert-txt"></div>
610
							</div>
611
							<div id="dialogue-obs-transaction-ko" class="alert alert-error alert-block hidden">
612
								<a class="close">×</a>
3248 idir 613
								<h4 class="alert-heading"><?php echo $resume['alerttrans']; ?></h4>
3239 idir 614
								<div class="alert-txt"></div>
615
							</div>
616
						</div>
617
					</div>
618
				</div>
3208 idir 619
 
3239 idir 620
				<!-- Fenêtres modales -->
621
				<div id="chargement" class="modal-fenetre hidden">
622
					<div id="chargement-centrage" class="modal-contenu">
623
						<div class="progress progress-striped active">
624
							<div id="barre-progression-upload" class="bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="10" style="">
3248 idir 625
									<span class="sr-only">0/10 <?php echo $resume['nbobs']; ?></span>
3239 idir 626
								</div>
627
						</div>
628
						<p id="chargement-txt" style="color:white;font-size:1.5em;">
3248 idir 629
							<?php echo $resume['transencours']; ?>
3239 idir 630
						</p>
631
					</div>
632
				</div>
3208 idir 633
 
3239 idir 634
				<!-- Templates HTML -->
635
				<div id="tpl-transmission-ok" class="hidden">
3248 idir 636
					<p class="msg"><?php echo $resume['transok']; ?></p>
3239 idir 637
				</div>
638
				<div id="tpl-transmission-ko" class="hidden">
3248 idir 639
					<p class="msg"><?php echo $resume['transko']; ?></p>
3239 idir 640
				</div>
641
			</div>
642
		</div>
643
		<div id="help-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="help-modal-label" style="display: none;" aria-hidden="true">
644
			<div class="modal-dialog modal-dialog-centered" role="document">
645
				<div class="modal-content">
646
					<div class="modal-header">
647
						<h5 class="modal-title" id="help-modal-label"></h5>
648
						<button type="button" class="close" data-dismiss="modal" aria-label="Close">
649
							<span aria-hidden="true">&times;</span>
650
						</button>
651
					</div>
652
					<div class="modal-body" id="print_content"></div>
653
					<div class="modal-footer">
654
						<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
655
					</div>
656
				</div>
657
			</div>
658
		</div>
659
		<!-- carto -->
3240 idir 660
		<?php if( $widget["type_localisation"] === 'point' ): ?>
3248 idir 661
			<script type="text/javascript" src="<?php echo $url_base; ?>modules/saisie2/squelettes/js/tb-geoloc/tb-geoloc-lib-app.js"></script>
662
			<script type="text/javascript" src="<?php echo $url_base; ?>modules/saisie2/squelettes/js/tb-geoloc/tb-geoloc-lib-app_inputs.js"></script>
3240 idir 663
		<?php elseif ( $widget["type_localisation"] === 'rue' ) : ?>
3248 idir 664
			<script type="text/javascript" src="<?php echo $url_base; ?>modules/saisie2/squelettes/js/tb-geoloc/tb-geoloc-custom-element.js"></script>
3240 idir 665
		<?php endif; ?>
666
		<script type="text/javascript">
667
			var tbGeolocation = document.getElementById( 'tb-geolocation' );
668
 
669
			tbGeolocation.addEventListener( 'location', function( location ) {
670
				console.log( location.detail );
671
				var locationDatas = location.detail;
672
				var latitude = '';
673
				var longitude = '';
3249 idir 674
				if ( undefined !== locationDatas.geometry.features ) {// rue
3240 idir 675
					latitude = ( locationDatas.geometry.features[0].geometry.coordinates[0][1] + locationDatas.geometry.features[0].geometry.coordinates[1][1]) / 2;
676
					longitude = ( locationDatas.geometry.features[0].geometry.coordinates[0][0] + locationDatas.geometry.features[0].geometry.coordinates[1][0]) / 2;
3249 idir 677
				} else  if ( undefined !== locationDatas.geometry.coordinates ) {// point
3240 idir 678
					latitude = locationDatas.geometry.coordinates[1];
679
					longitude = locationDatas.geometry.coordinates[0];
680
				}
681
 
682
				document.getElementById('pays').value = locationDatas.osmCountry;
683
				document.getElementById('commune-nom').value = locationDatas.locality;
684
				// À modifier quand on recevra les codes insee
685
				document.getElementById('commune-insee').value = locationDatas.osmPostcode;
686
				document.getElementById('latitude').value = latitude;
687
				document.getElementById('longitude').value = longitude;
688
				document.getElementById('altitude').value = locationDatas.elevation;
689
				document.getElementById('geoloc').value = 'ok';
3239 idir 690
			});
691
		</script>
3208 idir 692
 
3239 idir 693
		<!-- Jquery -->
694
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/1.11.1/jquery-1.11.1.min.js"></script>
3208 idir 695
 
3239 idir 696
		<!-- Jquery UI : nécessaire pour le minicalendrier et l'auto-complétion -->
697
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/jquery-ui/1.11.0/js/jquery-ui.min.js"></script>
3240 idir 698
		<!-- <script type="text/javascript" src="https://resources.tela-botanica.org/jquery/jquery-ui/1.11.0/js/datepicker-fr.js"></script> -->
3239 idir 699
		<!-- Jquery Plugins -->
700
		<!-- Jquery Validate : nécessaire pour la validation des formulaires -->
701
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/validate/1.11.1/jquery.validate.min.js"></script>
702
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/validate/1.11.1/additional-methods.min.js"></script>
703
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/validate/1.11.1/messages_fr.js"></script>
704
		<!-- Jquery Form :nécessaire pour l'upload des images -->
705
		<script type="text/javascript" src="https://resources.tela-botanica.org/jquery/form/3.51/jquery.form.min.js"></script>
706
		<!-- Bootstrap -->
707
		<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>
708
		<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
709
		<!-- Authentification -->
3248 idir 710
		<script type="text/javascript" src="<?php echo $url_base; ?>modules/saisie2/squelettes/js/auth.js"></script>
3239 idir 711
		<!-- Connexion, bloc de prévisualisation, date -->
3248 idir 712
		<script type="text/javascript" src="<?php echo $url_base; ?>modules/saisie2/squelettes/js/WidgetSaisie.js"></script>
713
		<script type="text/javascript" src="<?php echo $url_base; ?>modules/saisie2/squelettes/js/champs-supp.js"></script>
3239 idir 714
		<script type="text/javascript">
715
			//<![CDATA[
716
				$( document ).ready( function() {
3208 idir 717
 
3239 idir 718
					// OMG un modèle objet !!
719
					var widget = new WidgetSaisie();
3208 idir 720
 
3239 idir 721
					//
722
					//
723
					//
724
					// La présence du parametre 'debug' dans l'URL enclenche le débogage
3248 idir 725
					widget.debug = <?php echo isset( $_GET['debug'] ) ? 'true' : 'false'; ?>;
3239 idir 726
					// La présence du parametre 'html5' dans l'URL enclenche les fonctions avancées HTML5
3248 idir 727
					widget.html5 = <?php echo isset($_GET['html5']) ? 'true' : 'false'; ?>;
3239 idir 728
					// Mot-clé du widget/projet
729
					widget.tagProjet = "WidgetSaisie";
730
					// Mots-clés à ajouter aux images
3248 idir 731
					widget.tagImg = "<?php echo isset($_GET['tag-img']) ? $_GET['tag-img'] : ''; ?>";
732
					widget.separationTagImg = "<?php echo isset($_GET['motcle']) && isset($_GET['tag-img']) ? ',' : ''; ?>";
733
					widget.tagImg = <?php echo isset($_GET['motcle']) ? "'".$_GET['motcle']."' + widget.separationTagImg + widget.tagImg" : 'widget.tagImg'; ?>;
3239 idir 734
					// Mots-clés à ajouter aux observations
3248 idir 735
					widget.tagObs = "<?php echo isset($_GET['tag-obs']) ? $_GET['tag-obs'] : ''; ?>";
736
					widget.separationTagObs = "<?php echo isset($_GET['projet']) && isset($_GET['tag-obs']) ? ',' : ''; ?>";
737
					widget.tagObs = <?php echo isset($_GET['projet']) ? "'".$_GET['projet']."' + widget.separationTagObs + widget.tagObs" : 'widget.tagObs'; ?>;
3239 idir 738
					// Précharger le formulaire avec les infos d'une observation
3248 idir 739
					widget.obsId = "<?php echo isset($_GET['id-obs']) ? $_GET['id-obs'] : ''; ?>";
3239 idir 740
					// URL du web service réalisant l'insertion des données dans la base du CEL.
3248 idir 741
					widget.serviceSaisieUrl = "<?php echo $url_ws_saisie; ?>";
3239 idir 742
					// URL du web service permettant de récupérer les infos d'une observation du CEL.
3248 idir 743
					widget.serviceObsUrl = "<?php echo $url_ws_obs; ?>";
3239 idir 744
					//
745
					//
746
					//
3208 idir 747
 
3239 idir 748
					// langue
3248 idir 749
					widget.langue = "<?php echo $widget['langue']; ?>";
3239 idir 750
					// Squelette d'URL du web service de l'annuaire.
3248 idir 751
					widget.serviceAnnuaireIdUrl = "<?php echo $url_ws_annuaire; ?>";
3239 idir 752
					// URL de l'icône du chargement en cours
3248 idir 753
					widget.chargementIconeUrl = "<?php echo $url_base; ?>modules/saisie/squelettes/defaut/img/icones/chargement.gif";
3239 idir 754
					// URL de l'icône du chargement en cours d'une image
3248 idir 755
					widget.chargementImageIconeUrl = "<?php echo $url_base; ?>modules/saisie/squelettes/defaut/img/icones/chargement-image.gif";
3239 idir 756
					// URL de l'icône du calendrier
3248 idir 757
					widget.calendrierIconeUrl = "<?php echo $url_base; ?>modules/saisie/squelettes/defaut/img/icones/calendrier.png";
3239 idir 758
					// URL de l'icône pour une photo manquante
3248 idir 759
					widget.pasDePhotoIconeUrl = "<?php echo $url_base; ?>modules/saisie/squelettes/defaut/img/icones/pasdephoto.png";
3239 idir 760
 
761
					// Code du référentiel utilisé pour les nom scientifiques.
3248 idir 762
					widget.nomSciReferentiel = "<?php echo ( !empty( $widget['referentiel'] ) ) ? strtolower( $widget['referentiel'] ) : 'bdtfxr'; ?>";
3239 idir 763
					// Indication de la présence d'une espèce imposée
3248 idir 764
					widget.especeImposee = "<?php echo $espece_imposee; ?>";
3239 idir 765
					// Tableau d'informations sur l'espèce imposée
3248 idir 766
					widget.infosEspeceImposee = "<?php echo $infos_espece; ?>";
3239 idir 767
					// Nombre d'élément dans les listes d'auto-complétion
768
					widget.autocompletionElementsNbre = 20;
769
					// Indication de la présence d'un référentiel imposé
3248 idir 770
					widget.referentielImpose = "<?php echo $referentiel_impose; ?>";
3239 idir 771
 
772
					// URL du web service permettant l'auto-complétion des noms scientifiques
3248 idir 773
					widget.serviceAutocompletionNomSciUrl = "<?php echo $widget['especes']['url_ws_autocompletion_ns']; ?>?"+
3239 idir 774
						"masque={masque}&"+
775
						"recherche=etendue&"+
776
						"retour.champs=famille,nom_retenu,nom_retenu_complet,num_taxonomique,nom_retenu.id&"+
777
						"ns.structure=au&"+
778
						"navigation.limite=" + widget.autocompletionElementsNbre;
779
					// Squelette d'URL du web service permettant l'auto-complétion des noms scientifiques
3248 idir 780
					widget.serviceAutocompletionNomSciUrlTpl = "<?php echo $widget['especes']['url_ws_autocompletion_ns_tpl']; ?>?"+
3239 idir 781
						"masque={masque}&"+
782
						"recherche=etendue&"+
783
						"retour.champs=famille,nom_retenu,nom_retenu_complet,num_taxonomique,nom_retenu.id&"+
784
						"retour.tri=alpharet&"+ // tri "à la CeL"
785
						"ns.structure=au&"+
786
						"navigation.limite=" + widget.autocompletionElementsNbre;
787
					// Nombre d'observations max autorisé avant transmission
788
					widget.obsMaxNbre = 10;
789
					// Durée d'affichage en milliseconde des messages d'informations
790
					widget.dureeMessage = 30000;
791
					//
792
					//
793
					//
794
					// Squelette d'URL du web service d'eFlore fournissant les noms de communes.
795
					widget.serviceNomCommuneUrl = "https://api.tela-botanica.org/service:eflore:0.1/osm/nom-commune?lon={lon}&lat={lat}";
796
					// Squelette d'URL du web service d'eFlore fournissant les noms de communes hors de France (localisation approximative).
797
					widget.serviceNomCommuneUrlAlt = "https://api.tela-botanica.org/service:eflore:0.1/wikipedia/nom-commune?lon={lon}&lat={lat}&nbre=1";
798
					// URL du marqueur à utiliser dans la carte Google Map
3248 idir 799
					widget.googleMapMarqueurUrl = "<?php echo $url_base?>modules/saisie/squelettes/defaut/img/marqueurs/epingle.png";
3239 idir 800
					//
801
					//
802
					//
803
 
804
					// Initialisation du bousin
805
					widget.init();
806
				});
807
			//]]>
3230 delphine 808
		</script>
3208 idir 809
 
3230 delphine 810
		<!-- Barre de navigation -->
811
		<?php if ( $bar ): ?>
3248 idir 812
			<script src="<?php echo $url_script_navigation; ?>"></script>
3230 delphine 813
		<?php endif; ?>
814
	</body>
3208 idir 815
</html>