Subversion Repositories eFlore/Applications.cel

Rev

Rev 3257 | Rev 3268 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3257 Rev 3260
Line 32... Line 32...
32
		<!-- Jquery-ui custom css-->
32
		<!-- Jquery-ui custom css-->
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" />
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 -->
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" />
35
		<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous" />
36
		<!-- Fontawesome -->
36
		<!-- Fontawesome -->
37
		<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.1/css/all.css" integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ" crossorigin="anonymous" />
37
		<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
38
		<!-- Carto -->
38
		<!-- Carto -->
39
		<link href="<?php echo $url_base; ?>modules/saisie2/squelettes/js/tb-geoloc/styles.css" rel="stylesheet" type="text/css" media="screen" />
39
		<link href="<?php echo $url_base; ?>modules/saisie2/squelettes/js/tb-geoloc/styles.css" rel="stylesheet" type="text/css" media="screen" />
40
		<!-- STYLE SAISIE -->
40
		<!-- STYLE SAISIE -->
41
		<link href="<?php echo $url_base; ?>modules/saisie2/squelettes/css/saisie.css" rel="stylesheet" type="text/css" media="screen" />
41
		<link href="<?php echo $url_base; ?>modules/saisie2/squelettes/css/saisie.css" rel="stylesheet" type="text/css" media="screen" />
Line 50... Line 50...
50
 
50
 
51
	<body>
51
	<body>
52
		<?php
52
		<?php
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>': '';
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>': '';
54
		?>
-
 
55
		<!-- <?php //var_dump($widget['especes']['url_ws_autocompletion_ns']); ?> -->
54
		?>
56
		<div id="zone-appli" class="container" data-projet="<?php echo $widget['projet']; ?>" data-url-fichiers="<?php echo $widget['chemin_fichiers']; ?>">
55
		<div id="zone-appli" class="container" data-projet="<?php echo $widget['projet']; ?>" data-url-fichiers="<?php echo $widget['chemin_fichiers']; ?>">
57
			<div class="layout-wrapper page">
56
			<div class="layout-wrapper page">
-
 
57
				<div class="row mb-3">
58
				<div class="media mb-3">
58
					<div class="col-md-2 col-sm-10">
-
 
59
						<img id="logo" class="mr-3" src="<?php echo htmlspecialchars( $widget['chemin_fichiers'] . 'logo.' . preg_replace( '/(?:imag)?e\/?/','', $widget['logo'] ) ); ?>" alt="logo <?php echo $widget['projet']; ?>" />
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%" />
60
					</div>
60
					<div class="media-body">
61
					<div class="col-md-10 col-sm-12">
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>
62
						<h1 id="titre-projet" class="mt-0"><?php echo ( $widget['info'] ) ? $widget['titre'] . ' <div id="info-button" class="btn btn-outline-info btn-sm border-0" data-mime-info="' . $widget['info'] . '"><i class="fas fa-info-circle"></i></div>' : $widget['titre']; ?></h1>
62
					</div>
63
					</div>
Line 63... Line 64...
63
				</div>
64
				</div>
64
 
65
 
65
				<div class="row">
66
				<div class="row mb-3">
66
					<div class="col-md-6">
67
					<div class="col-md-6">
67
						<div id="description"><?php echo $widget['description']; ?></div>
68
						<div id="description"><?php echo $widget['description']; ?></div>
68
					</div>
69
					</div>
Line 77... Line 78...
77
				</div>
78
				</div>
Line 78... Line 79...
78
 
79
 
79
				<div id="formulaire" class="row mb-3 bloc-top">
80
				<div id="formulaire" class="row mb-3 bloc-top">
80
					<form id="form-observateur" role="form" autocomplete="on">
81
					<form id="form-observateur" role="form" autocomplete="on">
81
						<h2><?php echo $observateur['titre']; ?></h2>
-
 
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) :-->
82
						<h2><?php echo $observateur['titre']; ?></h2>
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"> -->
83
						<div id="tb-observateur" data-mode="<?php echo $conf_mode; ?>">
92
							<div class="navbar-default mb-3" id="tb-navbar">
84
							<div class="navbar-default mb-3" id="tb-navbar">
93
								<div class="nav navbar-nav navbar-right row">
85
								<div class="nav navbar-nav navbar-right row">
94
									<div id="bouton-connexion" class="volet col-md-6 col-sm-8">
86
									<div id="bouton-connexion" class="volet col-md-6 col-sm-8">
95
										<label for="bouton-connexion"><?php echo $observateur['compte']; ?></label>
87
										<label for="bouton-connexion"><?php echo $observateur['compte']; ?></label>
Line 173... Line 165...
173
						<div id="dialogue-utilisateur-non-identifie" class="alert alert-warning alert-block hidden">
165
						<div id="dialogue-utilisateur-non-identifie" class="alert alert-warning alert-block hidden">
174
							<a class="close">×</a>
166
							<a class="close">×</a>
175
							<h4 class="alert-heading"><?php echo $observateur['alertni-title']; ?></h4>
167
							<h4 class="alert-heading"><?php echo $observateur['alertni-title']; ?></h4>
176
							<p><?php echo $observateur['alertni']; ?></p>
168
							<p><?php echo $observateur['alertni']; ?></p>
177
						</div>
169
						</div>
178
						<div id="dialogue-geoloc-ko" class="alert alert-warning alert-block hidden">
-
 
179
							<a class="close">×</a>
-
 
180
							<h4 class="alert-heading"><?php echo $observateur['alertgk-title']; ?></h4>
-
 
181
							<p><?php echo $observateur['alertgk']; ?></p>
-
 
182
						</div>
-
 
183
					</div>
170
					</div>
Line 184... Line 171...
184
 
171
 
185
					<form id="form-observation" role="form" autocomplete="on" class="bloc-top">
172
					<form id="form-observation" role="form" autocomplete="on" class="bloc-top">
186
						<h2><?php echo $observation['titre']; ?></h2>
173
						<h2><?php echo $observation['titre']; ?></h2>
Line 190... Line 177...
190
								<div class="">
177
								<div class="">
191
									<label for="geolocalisation" class="col-sm-8 obligatoire" title="<?php echo $observateur['courriel-title']; ?>">
178
									<label for="geolocalisation" class="col-sm-8 obligatoire" title="<?php echo $observateur['courriel-title']; ?>">
192
										<i class="fa fa-street-view" aria-hidden="true"></i>
179
										<i class="fa fa-street-view" aria-hidden="true"></i>
193
										<?php echo $observation['geolocalisation']; ?>
180
										<?php echo $observation['geolocalisation']; ?>
194
									</label>
181
									</label>
195
									<div class="col-sm-8 mb-3">
182
									<div id="geoloc-datas">
196
										<input id="geolocalisation" name="geolocalisation" type="hidden">
-
 
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">
183
										<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">
184
										<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">
185
										<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">
186
										<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">
187
										<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">
188
										<input type="hidden" id="altitude" name="altitude" value="" style="display:none">
-
 
189
									</div>
-
 
190
									<div class="col-sm-8 mb-3">
-
 
191
										<tb-geolocation-element
-
 
192
											id="tb-geolocation"
-
 
193
											layer='osm'
-
 
194
											zoom_init="4"
-
 
195
											lat_init="46.5"
-
 
196
											lng_init="2.9"
-
 
197
											marker="<?php echo ( $widget['type_localisation'] === 'point' ) ? 'true' : 'false' ;?>"
-
 
198
											polyline="<?php echo ( $widget['type_localisation'] === 'rue' ) ? 'true' : 'false' ;?>"
-
 
199
											polygon="false"
-
 
200
											show_lat_lng_elevation_inputs="<?php echo ( $widget['type_localisation'] === 'point' ) ? 'true' : 'false' ;?>"
-
 
201
											osm_class_filter=""
-
 
202
											elevation_provider="mapquest"
-
 
203
											map_quest_api_key="mG6oU5clZHRHrOSnAV0QboFI7ahnGg34"
-
 
204
										>
206
										<tb-geolocation-element id="tb-geolocation"></tb-geolocation-element>
205
										</tb-geolocation-element>
207
									</div>
206
									</div>
208
								</div>
207
								</div>
Line 209... Line 208...
209
 
208
 
210
								<div class="control-group">
209
								<div class="control-group">
Line 245... Line 244...
245
										<label for="referentiel" class="col-sm-8 obligatoire" title="">
244
										<label for="referentiel" class="col-sm-8 obligatoire" title="">
246
											<i class="fa fa-book" aria-hidden="true"></i>
245
											<i class="fa fa-book" aria-hidden="true"></i>
247
											<?php echo $observation['referentiel']; ?>
246
											<?php echo $observation['referentiel']; ?>
248
										</label>
247
										</label>
249
										<div class="col-sm-8 mb-3">
248
										<div class="col-sm-8 mb-3">
250
											<select id="referentiel" class="form-control" >
249
											<select id="referentiel" class="form-control custom-select" >
-
 
250
												<option class="choisir" value="" selected hidden><?php echo $general['choisir']; ?></option>
251
												<option value="bdtfxr" selected="selected" title="Trachéophytes de France métropolitaine">Métropole (index réduit)</option>
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>
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>
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>
254
												<option value="bdtre" title="Trachéophytes de La Réunion">Réunion (BDTRE)</option>
255
												<option value="aublet" title="Guyane">Guyane (AUBLET2)</option>
255
												<option value="aublet" title="Guyane">Guyane (AUBLET2)</option>
Line 264... Line 264...
264
								<?php else : ?>
264
								<?php else : ?>
265
									<input id="referentiel" name="referentiel" value="<?php echo $widget['referentiel']; ?>" type="hidden">
265
									<input id="referentiel" name="referentiel" value="<?php echo $widget['referentiel']; ?>" type="hidden">
266
								<?php endif; ?>
266
								<?php endif; ?>
Line 267... Line 267...
267
 
267
 
-
 
268
								<div class="control-group">
268
								<div class="control-group">
269
									<?php $isTaxonListe = ( isset( $widget['especes']['taxons'] ) && count( (array) $widget['especes']['taxons'] ) > 0 ) ;?>
269
									<label for="taxon" class="col-sm-8" title="">
270
									<label for="<?php echo ( !$isTaxonListe ) ? 'taxon' : 'taxon-liste';?>" class="col-sm-8" title="">
270
										<i class="fa fa-leaf" aria-hidden="true"></i>
271
										<i class="fa fa-leaf" aria-hidden="true"></i>
271
										<?php echo $observation['espece']; ?><?php if ( !empty( $widget['referentiel'] ) ) echo " (" . $widget['referentiel'] . ")"; ?>
272
										<?php echo $observation['espece']; ?><?php if ( !empty( $widget['referentiel'] ) ) echo " (" . $widget['referentiel'] . ")"; ?>
272
									</label>
273
									</label>
273
									<div class="col-sm-8 mb-3">
274
									<div class="col-sm-8 mb-3">
274
										<?php if ($widget['type_especes'] === 'fixe' || $widget['especes']['espece_imposee'] == 1) { ?>
275
										<?php if ( $widget['type_especes'] === 'fixe' || $widget['especes']['espece_imposee'] ) : ?>
275
											<input id="taxon" name="taxon" type="text" class="form-control"
276
													<input id="taxon" name="taxon" type="text" class="form-control" value="<?php echo $widget['especes']['nom_sci_espece_defaut']; ?>" />
-
 
277
												</div>
276
												value="<?php echo $widget['especes']['nom_sci_espece_defaut']; ?>" />
278
											</div>
277
											
279
 
-
 
280
										<?php elseif ( isset( $widget['especes']['taxons'] ) && count( (array) $widget['especes']['taxons'] ) > 0 ) : ?>
278
										<?php } else if (isset($widget['especes']['taxons']) && $widget['especes']['taxons'] !== array()) { ksort($widget['especes']['taxons']);?>
281
											<?php ksort( $widget['especes']['taxons'] ); ?>
-
 
282
													<select id="taxon-liste" name="taxon-liste" class="form-control custom-select">
279
											<select id="taxon" name="taxon" class="form-control">
283
														<option class="choisir"  value="inconnue" selected hidden><?php echo $general['choisir']; ?></option>
-
 
284
														<?php foreach ($widget['especes']['taxons'] as $taxon)  : ?>
-
 
285
															<option
-
 
286
																class="nom-sci"
-
 
287
																value="<?php echo $taxon['nom_sel'];?>"
280
												<?php foreach ($widget['especes']['taxons'] as $taxon) : ?>
288
																title="<?php echo $taxon['nom_fr'];?>"
-
 
289
																data-num-nom-sel="<?php echo $taxon['num_nom_sel'];?>"
-
 
290
																data-nom-ret="<?php echo $taxon['nom_ret'];?>"
-
 
291
																data-num-nom-ret="<?php echo $taxon['num_nom_ret'];?>"
-
 
292
																data-nt="<?php echo $taxon['num_taxon'];?>"
-
 
293
																data-famille="<?php echo $taxon['famille'];?>"
281
													<option class="nom-sci" value="<?php echo $taxon['nom_sel']?>" title="<?php echo $taxon['nom_fr'];?>"><?php echo $taxon['nom_sel']?></option>
294
															><?php echo $taxon['nom_sel'];?></option>
-
 
295
														<?php endforeach; ?>
282
												<?php endforeach; ?>
296
														<option value="autre"><?php echo $observation['autre-espece']; ?></option>
-
 
297
													</select>
-
 
298
													<input id="taxon" name="taxon" class="form-control" type="hidden">
-
 
299
												</div>
-
 
300
											</div>
-
 
301
											<div id="taxon-input-groupe" class="control-group hidden">
-
 
302
												<label for="taxon-autre" class="col-sm-8" title="">
-
 
303
													<i class="fab fa-pagelines" aria-hidden="true"></i>
-
 
304
													<?php echo $observation['autre-espece']; ?>
-
 
305
												</label>
-
 
306
												<div class="col-sm-8 mb-3">
-
 
307
													<input id="taxon-autre" name="taxon-autre" class="form-control" type="text">
-
 
308
												</div>
283
											</select>
309
											</div>
284
										<?php } else { ?>
310
										<?php else : ?>
285
											<input id="taxon" name="taxon" class="form-control" type="text">
311
													<input id="taxon" name="taxon" class="form-control" type="text">
286
										<?php } ?>
312
												</div>
287
									</div>
313
											</div>
Line 288... Line 314...
288
								</div>
314
										<?php endif; ?>
289
 
315
 
290
								<div class="control-group">
316
								<div class="control-group">
291
									<label for="certitude" class="col-sm-8 obligatoire" title="">
317
									<label for="certitude" class="col-sm-8 obligatoire" title="">
292
										<i class="fa fa-question" aria-hidden="true"></i>
318
										<i class="fa fa-question" aria-hidden="true"></i>
293
										<?php echo $observation['certitude']; ?>
319
										<?php echo $observation['certitude']; ?>
294
									</label>
320
									</label>
295
									<div class="col-sm-8 mb-3">
321
									<div class="col-sm-8 mb-3">
296
										<select id="certitude" name="certitude" class="form-control">
322
										<select id="certitude" name="certitude" class="form-control custom-select">
297
											<option value="aDeterminer" ><?php echo $observation['certADet']; ?></option>
323
											<option class="aDeterminer" value="aDeterminer" ><?php echo $observation['certADet']; ?></option>
298
											<option value="douteuse" ><?php echo $observation['certDout']; ?></option>
324
											<option class="douteuse" value="douteuse" ><?php echo $observation['certDout']; ?></option>
299
											<option value="certaine" selected="selected" ><?php echo $observation['certCert']; ?></option>
325
											<option class="certaine" value="certaine" selected="selected" ><?php echo $observation['certCert']; ?></option>
300
										</select>
326
										</select>
301
									</div>
327
									</div>
302
								</div>
328
								</div>
303
								<div class="">
329
								<div class="">
304
									<label for="milieu" class="col-sm-8">
330
									<label for="milieu" class="col-sm-8">
305
										<i class="fa fa-street-view" aria-hidden="true"></i>
331
										<i class="fa fa-street-view" aria-hidden="true"></i>
306
										<?php echo $observation['milieu']; ?>
332
										<?php echo $observation['milieu']; ?>
307
									</label>
333
									</label>
308
									<div class="col-sm-8 mb-3">
334
									<div class="col-sm-8 mb-3">
-
 
335
										<?php if ( 0 < count( (array) $widget['milieux'] ) ) :?>
309
										<?php if ( 0 < count( (array) $widget['milieux'] ) ) :?>
336
											<select id="milieu" class="form-control custom-select" >
310
											<select id="milieu" class="form-control" >
337
												<option class="choisir" value="" selected hidden><?php echo $general['choisir']; ?></option>
311
												<?php foreach ( $widget['milieux'] as $milieu ) :?>
338
												<?php foreach ( $widget['milieux'] as $milieu ) :?>
312
													<option value="<?php echo $milieu; ?>"><?php echo $milieu; ?></option>
339
													<option value="<?php echo $milieu; ?>"><?php echo $milieu; ?></option>
313
												<?php endforeach; ?>
340
												<?php endforeach; ?>
314
											</select>
341
											</select>
315
										<?php else : ?>
342
										<?php else : ?>
316
											<input id="milieu" name="milieu" class="form-control" type="text" placeholder="<?php echo $observation['milieu-ph']; ?>">
343
											<input id="milieu" name="milieu" class="form-control" type="text" placeholder="<?php echo $observation['milieu-ph']; ?>">
317
										<?php endif; ?>
344
										<?php endif; ?>
318
									</div>
345
									</div>
319
								</div>
346
								</div>
320
								<div class="">
347
								<div class="">
321
                                    <label for="notes" class="col-sm-8" title="">
348
									<label for="notes" class="col-sm-8" title="">
322
                                        <i class="fa fa-pen" aria-hidden="true"></i>
349
										<i class="fa fa-pen" aria-hidden="true"></i>
323
                                        <?php echo $observation['notes']; ?>
350
										<?php echo $observation['notes']; ?>
324
                                    </label>
351
									</label>
325
                                    <div class="col-sm-8 mb-3">
352
									<div class="col-sm-8 mb-3">
326
                                        <textarea id="notes" form="form-observation" class="col-md-12" rows="7" name="notes" placeholder="<?php echo $observation['notes_ph']; ?>"></textarea>
353
										<textarea id="notes" form="form-observation" class="col-md-12" rows="7" name="notes" placeholder="<?php echo $observation['notes_ph']; ?>"></textarea>
Line 327... Line 354...
327
                                    </div>
354
									</div>
328
                                </div>
355
								</div>
329
 
356
 
Line -... Line 357...
-
 
357
							</div>
-
 
358
						</div>
-
 
359
					</form>
-
 
360
 
-
 
361
					<!-- Messages d'erreur du formulaire-->
-
 
362
					<div class="zone-alerte">
-
 
363
						<div id="dialogue-geoloc-ko" class="alert alert-warning alert-block hidden">
-
 
364
							<a class="close">×</a>
-
 
365
							<h4 class="alert-heading"><?php echo $observation['alertgk-title']; ?></h4>
-
 
366
							<p><?php echo $observation['alertgk']; ?></p>
-
 
367
						</div>
-
 
368
						<div id="dialogue-taxon-or-image" class="alert alert-warning alert-block hidden">
-
 
369
							<a class="close">×</a>
-
 
370
							<h4 class="alert-heading"><?php echo $observation['alert-img-tax-title']; ?></h4>
330
							</div>
371
							<p><?php echo $observation['alert-img-tax']; ?></p>
331
						</div>
372
						</div>
332
					</form>
373
					</div>
333
 
374
 
334
					<!-- Champs supplémentaires -->
375
					<!-- Champs supplémentaires -->
Line 341... Line 382...
341
									<?php foreach( $widget['chpSupp'][ $widget['projet'] ]['champs-supp'] as $champ ) : ?>
382
									<?php foreach( $widget['chpSupp'][ $widget['projet'] ]['champs-supp'] as $champ ) : ?>
342
										<?php
383
										<?php
343
											$min         = ( isset( $champ['fieldValues']['min'] ) )? ' min="' . $champ['fieldValues']['min'] . '"':'';
384
											$min         = ( isset( $champ['fieldValues']['min'] ) )? ' min="' . $champ['fieldValues']['min'] . '"':'';
344
											$max         = ( isset( $champ['fieldValues']['max'] ) )? ' max="' . $champ['fieldValues']['max'] . '"':'';
385
											$max         = ( isset( $champ['fieldValues']['max'] ) )? ' max="' . $champ['fieldValues']['max'] . '"':'';
345
											$step        = ( isset( $champ['fieldValues']['step'] ) )? ' step="' . $champ['fieldValues']['step'] . '"':'';
386
											$step        = ( isset( $champ['fieldValues']['step'] ) )? ' step="' . $champ['fieldValues']['step'] . '"':'';
346
											$default     = ( isset( $champ['fieldValues']['default'] ) )? ' value="' . $champ['fieldValues']['default'] . '"':'';
387
											$default     = ( isset( $champ['fieldValues']['default'] ) )? ' value="' . $champ['fieldValues']['default'] . '" data-default="' . $champ['fieldValues']['default'] . '"' :'';
347
											$description = ( isset( $champ['description'] ) )? ' title="' . $champ['description'] . '"':'';
388
											$description = ( isset( $champ['description'] ) )? ' title="' . $champ['description'] . '"':'';
348
											$placeholder = ( isset( $champ['fieldValues']['placeholder'] ) )? ' placeholder="' . $champ['fieldValues']['placeholder'] . '"':'';
389
											$placeholder = ( isset( $champ['fieldValues']['placeholder'] ) )? ' placeholder="' . $champ['fieldValues']['placeholder'] . '"':'';
349
											$required    = '';
390
											$required    = '';
350
											$mandatory   = '';
391
											$mandatory   = '';
351
											$pattern     = '';
392
											$pattern     = '';
Line 366... Line 407...
366
											}
407
											}
Line 367... Line 408...
367
 
408
 
368
											switch( $champ['element'] ) {
409
											switch( $champ['element'] ) {
369
												case 'radio':
410
												case 'radio':
370
												case 'checkbox': ?>
411
												case 'checkbox': ?>
371
													<div class="control-group <?php echo $champ['element']; ?> mb-3"<?php echo $description . $required; ?>>
412
													<div class="control-group <?php echo $champ['element']; ?> mb-3"<?php echo $description . $required; ?> data-name="<?php echo $champ['key']; ?>[]">
372
														<div class="col-sm-8 list-label<?php echo $help . $mandatory; ?>">
413
														<div class="col-sm-8 list-label<?php echo $help . $mandatory; ?>">
373
															<?php echo $champ['name'] . $help_button; ?>
414
															<?php echo $champ['name'] . $help_button; ?>
374
														</div>
415
														</div>
Line 384... Line 425...
384
																		endif;
425
																		endif;
385
																	?>
426
																	?>
Line 386... Line 427...
386
 
427
 
387
																	<?php if( 'other' !== $list_value ) : ?>
428
																	<?php if( 'other' !== $list_value ) : ?>
388
																		<label for="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>" class="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>">
429
																		<label for="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>" class="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>">
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']; ?>">
430
																			<input type="<?php echo $champ['element']; ?>" id="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>" name="<?php echo $champ['key']; ?>[]" value="<?php echo $list_value; ?>"<?php echo $checked; ?> class="<?php echo $champ['fieldValues']['cleanListValue'][$i] . ' ' . $champ['key']; ?>" data-label="<?php echo $champ['name']; ?>" data-name="<?php echo $champ['key']; ?>">
390
																			<?php echo $list_value; ?>
431
																			<?php echo $list_value; ?>
391
																		</label>
432
																		</label>
392
																	<?php else : ?>
433
																	<?php else : ?>
393
																		<label for="other-<?php echo $champ['key']; ?>">
434
																		<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']; ?>">
435
																			<input type="<?php echo $champ['element']; ?>" id="other-<?php echo $champ['key']; ?>" name="<?php echo $champ['key']; ?>[]" value="other" class="other <?php echo $champ['key']; ?>" data-label="<?php echo $champ['name']; ?>" data-element="<?php echo $champ['element']; ?>" data-name="<?php echo $champ['key']; ?>">
395
																			Autre
436
																			Autre
396
																		</label>
437
																		</label>
Line 397... Line 438...
397
																	<?php endif; ?>
438
																	<?php endif; ?>
Line 405... Line 446...
405
												case 'list-checkbox': ?>
446
												case 'list-checkbox': ?>
406
													<div class="multiselect <?php echo $champ['element'] . $help; ?>">
447
													<div class="multiselect <?php echo $champ['element'] . $help; ?>">
407
														<label class="col-sm-8<?php echo $mandatory; ?>" title="<?php echo $chpsupp['select-checkboxes-texte'];?>"><?php echo $champ['name'] . $help_button; ?></label>
448
														<label class="col-sm-8<?php echo $mandatory; ?>" title="<?php echo $chpsupp['select-checkboxes-texte'];?>"><?php echo $champ['name'] . $help_button; ?></label>
408
														<div class="control-group col-sm-8 mb-3">
449
														<div class="control-group col-sm-8 mb-3">
409
															<div class="selectBox">
450
															<div class="selectBox">
410
																<select class="form-control list-checkbox" id="list-checkbox-<?php echo $champ['key']; ?>"<?php echo $description . $required; ?> class="form-control">
451
																<select class="form-control list-checkbox custom-select" id="list-checkbox-<?php echo $champ['key']; ?>"<?php echo $description; ?> class="form-control">
411
																	<option><?php echo $chpsupp['select-checkboxes-texte'];?></option>
452
																	<option><?php echo $chpsupp['select-checkboxes-texte'];?></option>
412
																</select>
453
																</select>
413
																<div class="overSelect"></div>
454
																<div class="overSelect"></div>
414
															</div>
455
															</div>
415
															<div class="checkboxes hidden">
456
															<div class="checkboxes hidden" <?php echo $required; ?> data-name="<?php echo $champ['key']; ?>[]">
416
																<?php foreach ( $champ['fieldValues']['listValue'] as $i => $list_value ) : ?>
457
																<?php foreach ( $champ['fieldValues']['listValue'] as $i => $list_value ) : ?>
Line 417... Line 458...
417
 
458
 
418
																	<?php
459
																	<?php
419
																		$checked = '';
460
																		$checked = '';
Line 423... Line 464...
423
																		endif;
464
																		endif;
424
																	?>
465
																	?>
Line 425... Line 466...
425
 
466
 
426
																	<?php if( 'other' !== $list_value ) : ?>
467
																	<?php if( 'other' !== $list_value ) : ?>
427
																		<label for="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>">
468
																		<label for="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>">
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']; ?>">
469
																			<input type="checkbox" id="<?php echo $champ['fieldValues']['cleanListValue'][$i]; ?>" name="<?php echo $champ['key']; ?>[]" value="<?php echo $list_value; ?>"<?php echo $checked; ?> class="<?php echo $champ['fieldValues']['cleanListValue'][$i] . ' ' . $champ['key']; ?>" data-label="<?php echo $champ['name']; ?>" data-name="<?php echo $champ['key']; ?>">
429
																			<?php echo $list_value; ?>
470
																			<?php echo $list_value; ?>
430
																		</label>
471
																		</label>
431
																	<?php else : ?>
472
																	<?php else : ?>
432
																		<label for="other-<?php echo $champ['key']; ?>">
473
																		<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']; ?>">
474
																			<input type="checkbox" id="other-<?php echo $champ['key']; ?>" name="<?php echo $champ['key']; ?>[]" value="other" class="other <?php echo $champ['key']; ?>" data-label="<?php echo $champ['name']; ?>" data-element="checkboxes" data-name="<?php echo $champ['key']; ?>">
434
																			Autre
475
																			Autre
435
																		</label>
476
																		</label>
Line 436... Line 477...
436
																	<?php endif; ?>
477
																	<?php endif; ?>
Line 441... Line 482...
441
														</div>
482
														</div>
442
													</div>
483
													</div>
443
												<?php break;
484
												<?php break;
Line 444... Line 485...
444
 
485
 
-
 
486
												case 'select': ?>
445
												case 'select': ?>
487
													<div class="control-group mb-3">
446
													<label for="<?php echo $champ['key']; ?>" class="col-sm-8<?php echo $mandatory; ?>"<?php echo $description; ?>><?php echo $champ['name'] . $help_button; ?></label>
488
														<label for="<?php echo $champ['key']; ?>" class="col-sm-8<?php echo $mandatory; ?>"<?php echo $description; ?>><?php echo $champ['name'] . $help_button; ?></label>
447
													<div class="champ col-sm-8 mb-3">
489
														<div class="champ col-sm-8 mb-3">
448
														<div class="select-wrapper add-field-select <?php echo $champ['element'] . $help; ?>">
490
															<div class="select-wrapper add-field-select <?php echo $help; ?>">
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']; ?>">
491
																<select id="<?php echo $champ['key']; ?>" class="<?php echo $champ['key'] . ' ' . $champ['element']; ?> form-control  custom-select mb-2"<?php echo $required; ?> data-label="<?php echo $champ['name']; ?>"  data-name="<?php echo $champ['key']; ?>">
450
 
492
 
-
 
493
																	<?php foreach ( $champ['fieldValues']['listValue'] as $list_value ) : ?>
-
 
494
 
-
 
495
																		<?php
-
 
496
																			$selected = '';
-
 
497
																			if ( '#' === substr( $list_value, -1 ) ) :
-
 
498
																				$selected = ' selected="selected"';
-
 
499
																				$list_value = substr( $list_value, 0, -1 );
-
 
500
																			endif;
-
 
501
																		?>
-
 
502
 
-
 
503
																		<?php if( 'other' !== $list_value ) : ?>
-
 
504
																			<option value="<?php echo $list_value; ?>"<?php echo $selected; ?> data-name="<?php echo $champ['key']; ?>">
-
 
505
																				<?php echo ucfirst( $list_value ); ?>
-
 
506
																			</option>
-
 
507
																		<?php else : ?>
-
 
508
																			<option id="other-<?php echo $champ['key']; ?>" class="other form-control is-select" value="other" data-element="<?php echo $champ['element']; ?>" data-name="<?php echo $champ['key']; ?>">Autre</option>
Line 451... Line -...
451
																<?php foreach ( $champ['fieldValues']['listValue'] as $list_value ) : ?>
-
 
452
 
-
 
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
																	?>
-
 
460
 
-
 
461
																	<?php if( 'other' !== $list_value ) : ?>
-
 
462
																		<option value="<?php echo $list_value; ?>"<?php echo $selected; ?>>
-
 
463
																			<?php echo ucfirst( $list_value ); ?>
-
 
464
																		</option>
-
 
465
																	<?php else : ?>
509
																		<?php endif; ?>
Line 466... Line 510...
466
																		<option class="other form-control is-select" value="other" data-element="<?php echo $champ['element']; ?>">Autre</option>
510
 
467
																	<?php endif; ?>
-
 
468
 
511
																	<?php endforeach; ?>
469
																<?php endforeach; ?>
512
 
470
 
513
																</select>
471
															</select>
514
															</div>
Line 472... Line 515...
472
														</div>
515
														</div>
Line 504... Line 547...
504
																	$div_range_min_max .= '10';
547
																	$div_range_min_max .= '10';
505
																} else {
548
																} else {
506
																	$div_range_min_max .= '12';
549
																	$div_range_min_max .= '12';
507
																}
550
																}
Line 508... Line 551...
508
 
551
 
Line 509... Line 552...
509
																$div_range_min_max .= '"></div>';
552
																$div_range_min_max .= '" onload="this.innerText = document.getElementById(&apos;ajouter-obs&apos;).value"></div>';
510
 
553
 
511
																if( isset( $champ['fieldValues']['max'] ) ) {
554
																if( isset( $champ['fieldValues']['max'] ) ) {
512
																	$div_range_min_max .=
555
																	$div_range_min_max .=
Line 568... Line 611...
568
							<div id="miniatures"></div>
611
							<div id="miniatures"></div>
569
							<p class="miniature-msg" class="span12">&nbsp;</p>
612
							<p class="miniature-msg" class="span12">&nbsp;</p>
570
						</div>
613
						</div>
571
					</form>
614
					</form>
Line -... Line 615...
-
 
615
 
-
 
616
					<!-- Messages d'erreur du formulaire-->
-
 
617
					<div class="zone-alerte">
-
 
618
						<div id="dialogue-image-or-taxon" class="alert alert-warning alert-block hidden">
-
 
619
							<a class="close">×</a>
-
 
620
							<h4 class="alert-heading"><?php echo $observation['alert-img-tax-title']; ?></h4>
-
 
621
							<p><?php echo $observation['alert-img-tax']; ?></p>
-
 
622
						</div>
-
 
623
					</div>
572
 
624
 
573
					<div id="image" class="row"></div>
625
					<div id="image" class="row"></div>
Line 574... Line 626...
574
				</div>
626
				</div>
575
 
627
 
Line 605... Line 657...
605
						<button id="transmettre-obs" class="btn btn-primary droite" disabled="disabled"
657
						<button id="transmettre-obs" class="btn btn-primary droite" disabled="disabled"
606
							title="<?php echo $resume['trans-title']; ?>" type="button">
658
							title="<?php echo $resume['trans-title']; ?>" type="button">
607
							<?php echo $resume['trans']; ?>
659
							<?php echo $resume['trans']; ?>
608
						</button>
660
						</button>
609
					</div>
661
					</div>
-
 
662
					<!-- chargement -->
-
 
663
					<div id="chargement" class="modal-fenetre hidden">
-
 
664
						<div id="chargement-centrage" class="modal-contenu">
-
 
665
							<div class="progress active">
-
 
666
								<div id="barre-progression-upload" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="10" style="">
-
 
667
										<span class="sr-only">0/10 <?php echo $resume['nbobs']; ?></span>
-
 
668
									</div>
-
 
669
							</div>
-
 
670
							<p id="chargement-txt"><?php echo $resume['transencours']; ?></p>
-
 
671
						</div>
-
 
672
					</div>
610
					<div id="liste-obs" ></div>
673
					<div id="liste-obs" ></div>
611
					<div class="row">
674
					<div class="row">
612
						<div class="zone-alerte">
675
						<div class="zone-alerte">
613
							<div id="dialogue-zero-obs" class="alert alert-block hidden">
676
							<div id="dialogue-zero-obs" class="alert alert-block hidden">
614
								<a class="close">×</a>
677
								<a class="close">×</a>
Line 627... Line 690...
627
							</div>
690
							</div>
628
						</div>
691
						</div>
629
					</div>
692
					</div>
630
				</div>
693
				</div>
Line 631... Line -...
631
 
-
 
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="">
-
 
637
									<span class="sr-only">0/10 <?php echo $resume['nbobs']; ?></span>
-
 
638
								</div>
-
 
639
						</div>
-
 
640
						<p id="chargement-txt" style="color:white;font-size:1.5em;">
-
 
641
							<?php echo $resume['transencours']; ?>
-
 
642
						</p>
-
 
643
					</div>
-
 
644
				</div>
-
 
645
 
694
 
646
				<!-- Templates HTML -->
695
				<!-- Templates HTML -->
647
				<div id="tpl-transmission-ok" class="hidden">
696
				<div id="tpl-transmission-ok" class="hidden">
648
					<p class="msg"><?php echo $resume['transok']; ?></p>
697
					<p class="msg"><?php echo $resume['transok']; ?></p>
649
				</div>
698
				</div>
650
				<div id="tpl-transmission-ko" class="hidden">
699
				<div id="tpl-transmission-ko" class="hidden">
651
					<p class="msg"><?php echo $resume['transko']; ?></p>
700
					<p class="msg"><?php echo $resume['transko']; ?></p>
652
				</div>
701
				</div>
653
			</div>
702
			</div>
-
 
703
		</div>
-
 
704
 
654
		</div>
705
		<!-- Modales Aide -->
655
		<div id="help-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="help-modal-label" style="display: none;" aria-hidden="true">
706
		<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">
707
			<div class="modal-dialog modal-dialog-centered" role="document">
657
				<div class="modal-content">
708
				<div class="modal-content">
658
					<div class="modal-header">
709
					<div class="modal-header">
Line 666... Line 717...
666
						<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
717
						<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
667
					</div>
718
					</div>
668
				</div>
719
				</div>
669
			</div>
720
			</div>
670
		</div>
721
		</div>
-
 
722
 
671
		<!-- carto -->
723
		<!-- carto -->
672
		<?php if( $widget["type_localisation"] === 'point' ): ?>
-
 
673
			<script type="text/javascript" src="<?php echo $url_base; ?>modules/saisie2/squelettes/js/tb-geoloc/tb-geoloc-lib-app.js"></script>
724
		<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>
-
 
675
		<?php elseif ( $widget["type_localisation"] === 'rue' ) : ?>
-
 
676
			<script type="text/javascript" src="<?php echo $url_base; ?>modules/saisie2/squelettes/js/tb-geoloc/tb-geoloc-custom-element.js"></script>
-
 
677
		<?php endif; ?>
-
 
678
		<script type="text/javascript">
725
		<script type="text/javascript">
679
			var tbGeolocation = document.getElementById( 'tb-geolocation' );
726
			var tbGeolocation = document.getElementById( 'tb-geolocation' );
Line 680... Line 727...
680
 
727
 
681
			tbGeolocation.addEventListener( 'location', function( location ) {
728
			tbGeolocation.addEventListener( 'location', function( location ) {
682
				console.log( location.detail );
-
 
683
				var locationDatas = location.detail;
-
 
684
				var latitude = '';
-
 
685
				var longitude = '';
-
 
686
				if ( undefined !== locationDatas.geometry.features ) {// rue
-
 
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;
-
 
689
				} else  if ( undefined !== locationDatas.geometry.coordinates ) {// point
-
 
690
					latitude = locationDatas.geometry.coordinates[1];
-
 
691
					longitude = locationDatas.geometry.coordinates[0];
-
 
Line 692... Line 729...
692
				}
729
				console.log( location.detail );
-
 
730
 
-
 
731
				var secVal = location.detail.geometry.coordinates[1],
-
 
732
					firstVal = location.detail.geometry.coordinates[0],
-
 
733
					latitude = '',
693
 
734
					longitude = '';
694
				document.getElementById('pays').value = locationDatas.osmCountry;
735
 
-
 
736
				if ( 'object' === typeof secVal && 'object' === typeof firstVal ) {// rue
695
				document.getElementById('commune-nom').value = locationDatas.locality;
737
					latitude =  ( ( firstVal[1] + secVal[1] ) / 2 ).toFixed( 6 );
-
 
738
					longitude = ( ( firstVal[0] + secVal[0] ) / 2 ).toFixed( 6 );
-
 
739
				} else  if ( 'number' === typeof secVal && 'number' === typeof firstVal ) {// point
-
 
740
					latitude = secVal;
696
				// À modifier quand on recevra les codes insee
741
					longitude = firstVal;
697
				document.getElementById('commune-insee').value = locationDatas.osmPostcode;
742
				}
-
 
743
				document.getElementById( 'latitude' ).value = latitude;
698
				document.getElementById('latitude').value = latitude;
744
				document.getElementById( 'longitude' ).value = longitude;
-
 
745
				document.getElementById( 'pays' ).value = location.detail.osmCountry;
699
				document.getElementById('longitude').value = longitude;
746
				document.getElementById( 'commune-nom' ).value = location.detail.inseeData.nom;
700
				document.getElementById('altitude').value = locationDatas.elevation;
747
				document.getElementById( 'commune-insee' ).value = location.detail.inseeData.code;
701
				document.getElementById('geoloc').value = 'ok';
748
				document.getElementById( 'altitude' ).value = location.detail.elevation;
Line 702... Line 749...
702
			});
749
			});
703
		</script>
750
		</script>
Line 777... Line 824...
777
					// Tableau d'informations sur l'espèce imposée
824
					// Tableau d'informations sur l'espèce imposée
778
					widget.infosEspeceImposee = "<?php echo $widget['especes']['infos_espece']; ?>";
825
					widget.infosEspeceImposee = "<?php echo $widget['especes']['infos_espece']; ?>";
779
					// Nombre d'élément dans les listes d'auto-complétion
826
					// Nombre d'élément dans les listes d'auto-complétion
780
					widget.autocompletionElementsNbre = 20;
827
					widget.autocompletionElementsNbre = 20;
781
					// Indication de la présence d'un référentiel imposé
828
					// Indication de la présence d'un référentiel imposé
782
					widget.referentielImpose = "<?php echo ( !empty( $widget['referentiel'] ) ) ? strtolower( $widget['referentiel'] ) : 'bdtfxr'; ?>";;
829
					widget.referentielImpose = "<?php echo ( !empty( $widget['referentiel'] ) ) ? strtolower( $widget['referentiel'] ) : 'bdtfxr'; ?>";
783
 
-
 
-
 
830
					// #taxon est une liste
-
 
831
					widget.isTaxonListe = <?php echo ( isset( $widget['especes']['taxons'] ) && count( (array) $widget['especes']['taxons'] ) )? 'true' : 'false' ; ?>;
784
					// URL du web service permettant l'auto-complétion des noms scientifiques
832
					// URL du web service permettant l'auto-complétion des noms scientifiques
785
					widget.serviceAutocompletionNomSciUrl = "<?php echo $widget['especes']['url_ws_autocompletion_ns']; ?>?"+
833
					widget.serviceAutocompletionNomSciUrl = "<?php echo $widget['especes']['url_ws_autocompletion_ns']; ?>?"+
786
						"masque={masque}&"+
834
						"masque={masque}&"+
787
						"recherche=etendue&"+
835
						"recherche=etendue&"+
788
						"retour.champs=famille,nom_retenu,nom_retenu_complet,num_taxonomique,nom_retenu.id&"+
836
						"retour.champs=famille,nom_retenu,nom_retenu_complet,num_taxonomique,nom_retenu.id&"+
Line 797... Line 845...
797
						"ns.structure=au&"+
845
						"ns.structure=au&"+
798
						"navigation.limite=" + widget.autocompletionElementsNbre;
846
						"navigation.limite=" + widget.autocompletionElementsNbre;
799
					// Nombre d'observations max autorisé avant transmission
847
					// Nombre d'observations max autorisé avant transmission
800
					widget.obsMaxNbre = 10;
848
					widget.obsMaxNbre = 10;
801
					// Durée d'affichage en milliseconde des messages d'informations
849
					// Durée d'affichage en milliseconde des messages d'informations
802
					widget.dureeMessage = 30000;
850
					widget.dureeMessage = 10000;
803
					//
851
					//
804
					//
852
					//
805
					//
853
					//
806
					// Squelette d'URL du web service d'eFlore fournissant les noms de communes.
854
					// 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}";
855
					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).
856
					// 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";
857
					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
858
					// URL du marqueur à utiliser dans la carte Google Map
811
					widget.googleMapMarqueurUrl = "<?php echo $url_base?>modules/saisie/squelettes/defaut/img/marqueurs/epingle.png";
859
					widget.googleMapMarqueurUrl = "<?php echo $url_base; ?>modules/saisie/squelettes/defaut/img/marqueurs/epingle.png";
812
					//
860
					//
813
					//
861
					//
814
					//
862
					//
Line 815... Line 863...
815
 
863
 
816
					// Initialisation du bousin
864
					// Initialisation du bousin
817
					widget.init();
865
					widget.init();
818
				});
866
				});
819
			//]]>
867
			//]]>
820
		</script>
-
 
821
 
868
		</script>
822
		<!-- Barre de navigation -->
869
		<!-- Barre de navigation -->
823
		<?php if ( $bar ): ?>
870
		<?php if ( $bar ): ?>
824
			<script src="<?php echo $url_script_navigation; ?>"></script>
871
			<script src="<?php echo $url_script_navigation; ?>"></script>
825
		<?php endif; ?>
872
		<?php endif; ?>