Subversion Repositories eFlore/Applications.cel

Rev

Rev 3318 | Rev 3370 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3318 idir 1
<div id="zone-lichens" class="bloc-top">
2
	<h2 class="mb-3"><?php echo $lichens['titre']; ?></h2>
3
	<div id="bouton-poursuivre" class="btn btn-success hidden mb-3" data-load="lichens">
4
		<i class="far fa-plus-square"></i>&nbsp;<?php echo $lichens['poursuivre-lichens']; ?>
5
	</div>
6
	<div class="row">
7
		<div id="bloc-lichens-gauche" class="col-md-6">
8
			<div id="bloc-form-lichens" class="">
9
				<form id="form-lichens" role="form" autocomplete="off">
10
					<div class="control-group">
11
						<label for="choisir-arbre" class="col-sm-8 obligatoire" title="<?php echo $lichens['arbre-title']; ?>">
12
							<i class="fas fa-tree" aria-hidden="true"></i>
13
							<?php echo $general['arbre']; ?>
14
						</label>
15
						<div class="col-sm-8 mb-3">
16
							<select id="choisir-arbre" name="choisir-arbre" class="choisir-arbre form-control custom-select has-tooltip" data-toggle="tooltip"  title="<?php echo $lichens['arbre-title']; ?>" required>
17
								<option value="" selected hidden><?php echo $general['numero-arbre']; ?></option>
18
							</select>
19
						</div>
20
					</div>
21
 
22
					<div class="control-group">
23
						<label for="obs-date" class="col-sm-8 obligatoire" title="">
24
							<i class="fa fa-calendar" aria-hidden="true"></i>
25
							<?php echo $general['date']; ?>
26
						</label>
27
						<div class="col-sm-8 mb-3">
28
							<input type="date" id="obs-date" name="obs-date" class="form-control" max="<?php echo date('Y-m-d', time()); ?>" placeholder="jj/mm/aaaa" required>
29
						</div>
30
					</div>
31
 
32
					<input id="referentiel" name="referentiel" value="<?php echo $widget['referentiel']; ?>" type="hidden">
33
 
34
					<div id="bloc-taxon" class="control-group">
3334 idir 35
						<label for="taxon-liste" class="col-sm-8 obligatoire" title="">
3318 idir 36
							<i class="fa fa-leaf" aria-hidden="true"></i>
3334 idir 37
							<?php echo $general['espece']; ?><!-- (<?php echo $widget['referentiel']; ?>)-->
3318 idir 38
						</label>
39
						<div class="col-sm-8 mb-3">
3334 idir 40
							<?php ksort( $widget['especes']['taxons'] ); ?>
41
							<select id="taxon-liste" name="taxon-liste" class="form-control custom-select taxon-validation has-tooltip" data-toggle="tooltip" title="<?php echo $observation['liste-espece-title']; ?>">
42
								<option class="choisir" value="inconnue" selected hidden><?php echo $general['choisir']; ?></option>
43
								<?php foreach ($widget['especes']['taxons'] as $taxon)  : ?>
44
									<option
45
										class="nom-sci"
46
										value="<?php echo $taxon['nom_sel'];?>"
47
										title="<?php echo $taxon['nom_fr'];?>"
48
										data-num-nom-sel="<?php echo $taxon['num_nom_sel'];?>"
49
										data-nom-ret="<?php echo $taxon['nom_ret'];?>"
50
										data-num-nom-ret="<?php echo $taxon['num_nom_ret'];?>"
51
										data-nt="<?php echo $taxon['num_taxon'];?>"
52
										data-famille="<?php echo $taxon['famille'];?>"
53
									><?php echo $taxon['nom_sel'];?></option>
54
								<?php endforeach; ?>
55
								<option value="autre"><?php echo $general['autre-espece']; ?></option>
56
							</select>
57
							<span for="taxon-liste" class="error" style="display: none;"><?php echo $observation['error-taxon'];?></span>
58
							<input id="taxon" name="taxon" type="hidden" />
3318 idir 59
						</div>
60
					</div>
3334 idir 61
					<div id="taxon-input-groupe" class="control-group hidden">
62
						<label for="taxon-autre" class="col-sm-8" title="">
63
							<i class="fab fa-pagelines" aria-hidden="true"></i>
64
							<?php echo $general['autre-espece']; ?>
65
						</label>
66
						<div class="col-sm-8 mb-3">
67
							<input id="taxon-autre" name="taxon-autre" class="form-control has-tooltip" type="text" data-toggle="tooltip" title="<?php echo $observation['espece-title']; ?>">
68
						</div>
69
					</div>
3318 idir 70
 
71
					<div class="control-group">
72
						<label for="certitude" class="col-sm-8 obligatoire" title="">
73
							<i class="fa fa-question" aria-hidden="true"></i>
74
							<?php echo $general['certitude']; ?>
75
						</label>
76
						<div class="col-sm-8 mb-3">
77
							<select id="certitude" name="certitude" class="form-control custom-select" required>
78
								<option value="" hidden selected><?php echo $general['choisir']; ?></option>
79
								<option value="à déterminer" class="aDeterminer"><?php echo $general['certADet']; ?></option>
80
								<option value="douteuse" class="douteuse"><?php echo $general['certDout']; ?></option>
81
								<option value="certaine" class="certaine"><?php echo $general['certCert']; ?></option>
82
							</select>
83
						</div>
84
					</div>
85
					<div class="control-group">
86
						<div class="col-sm-8 mb-2 list-label obligatoire" title="<?php echo $lichens['loc-tronc-title']; ?>">
87
							<i class="fas fa-cube" aria-hidden="true"></i>
88
							<?php echo $lichens['loc-tronc']; ?>
89
						</div>
90
						<table class="table col-sm-8">
91
						  <thead>
92
							<tr>
93
							  <th scope="col">Face :</th>
94
							  <th scope="col"><?php echo $general['nord']; ?></th>
95
							  <th scope="col"><?php echo $general['est']; ?></th>
96
							  <th scope="col"><?php echo $general['sud']; ?></th>
97
							  <th scope="col"><?php echo $general['ouest']; ?></th>
98
							</tr>
99
						  </thead>
100
						  <tbody>
101
							<tr>
102
							  <th scope="row">1 (haut)</th>
103
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-n1" value="n1"></td>
104
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-s1" value="s1"></td>
105
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-e1" value="e1"></td>
106
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-o1" value="o1"></td>
107
							</tr>
108
							<tr>
109
							  <th scope="row">2</th>
110
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-n2" value="n2"></td>
111
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-s2" value="s2"></td>
112
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-e2" value="e2"></td>
113
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-o2" value="o2"></td>
114
							</tr>
115
							<tr>
116
							  <th scope="row">3</th>
117
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-n3" value="n3"></td>
118
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-s3" value="s3"></td>
119
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-e3" value="e3"></td>
120
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-o3" value="o3"></td>
121
							</tr>
122
							<tr>
123
							  <th scope="row">4</th>
124
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-n4" value="n4"></td>
125
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-s4" value="s4"></td>
126
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-e4" value="e4"></td>
127
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-o4" value="o4"></td>
128
							</tr>
129
							<tr>
130
							  <th scope="row">5 (bas)</th>
131
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-n5" value="n5"></td>
132
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-s5" value="s5"></td>
133
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-e5" value="e5"></td>
134
							  <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-o5" value="o5"></td>
135
							</tr>
136
						  </tbody>
137
						</table>
138
					</div>
139
 
140
					<div class="">
141
						<label for="commentaire" class="col-sm-8" title="">
142
							<i class="fa fa-pen" aria-hidden="true"></i>
143
							<?php echo $general['commentaires']; ?>
144
						</label>
145
						<div class="col-sm-8 mb-3">
146
							<textarea id="commentaire" class="col-md-12" rows="7" name="commentaire"></textarea>
147
						</div>
148
					</div>
149
				</form>
150
				<form id="form-upload" class="form-horizontal" action="<?php echo $url_ws_upload ?>" method="post" enctype="multipart/form-data">
151
					<div class="col-sm-8 mb-2 list-label and-help">
152
						<i class="fa fa-images" aria-hidden="true"></i>
153
						<?php echo $lichens['titre-photos']; ?>
154
					</div>
155
					<p id="miniature-info" class="col-sm-8">
156
						<?php echo $image['aide']; ?>
157
					</p>
158
					<div id ="photos-conteneur" class="control-group col-sm-8">
159
						<div id="bouton-fichier">
160
							<label for="fichier" class="label-file btn btn-large btn-info mb-3" title="<?php echo $image['photos-title']; ?>">
161
								<span class="label-text"><i class="fas fa-download"></i> <?php echo $image['ajouter']; ?></span>
162
								<input type="file" id="fichier" name="fichier" class="input-file" accept="image/jpeg" multiple>
163
								<input type="hidden" name="MAX_FILE_SIZE" value="5242880">
164
							</label>
165
						</div>
166
 
167
						<div id="miniatures"></div>
168
						<p class="miniature-msg" class="span12">&nbsp;</p>
169
					</div>
170
				</form>
171
				<!-- Bouton création d'une obs -->
172
				<div class="col-sm-8 mb-3">
173
					<div title="<?php echo $resume['creer-title']; ?>">
174
						<button id="ajouter-obs" class="btn btn-primary"><i class="fas fa-step-forward"></i> <?php echo $general['suivant']; ?></button>
175
					</div>
176
				</div>
177
			</div>
178
		</div><!-- fin formulaire lichens -->
179
		<!-- zone résumé obs lichens ( =zone de droite) -->
180
		<div id="bloc-lichens-droite" class="col-md-6">
181
			<!-- Messages d'erreur du formulaire -->
182
			<div class="row">
183
				<div class="zone-alerte">
184
					<div id="dialogue-bloquer-creer-obs" class="alert alert-warning alert-block hidden">
185
						<a class="close">×</a>
186
						<h4 class="alert-heading"><?php echo $resume['alert10max']; ?></h4>
187
						<p><?php echo $resume['alert10max-desc']; ?></p>
188
					</div>
189
					<div id="dialogue-form-invalide" class="alert alert-warning alert-block hidden">
190
						<a class="close">×</a>
191
						<h4 class="alert-heading"><?php echo $resume['alertchp']; ?></h4>
192
						<p><?php echo $resume['alertchp-desc']; ?></p>
193
					</div>
194
					<div id="dialogue-taxon-or-image" class="alert alert-warning alert-block hidden">
195
						<a class="close">×</a>
196
						<h4 class="alert-heading"><?php echo $observation['alert-img-tax-title']; ?></h4>
197
						<p><?php echo $lichens['alert-img-tax']; ?></p>
198
					</div>
199
				</div>
200
			</div>
201
 
202
			<!-- Affiche le tableau récapitualif des observations ajoutées -->
203
			<div id="zone-liste-obs" class="">
204
				<div id="bloc-controle-liste-obs" class="alert alert-info">
205
					<h2 class="transmission-title"><strong><?php echo $resume['titre']; ?> <span class="obs-nbre badge badge-info">0</span></strong></h2>
206
					<button id="transmettre-obs" class="btn btn-primary has-tooltip" data-toggle="tooltip" disabled="disabled"
207
						title="<?php echo $resume['trans-title']; ?>" type="button">
208
						<?php echo $general['enregistrer']; ?>
209
					</button>
210
				</div>
211
				<div id="liste-obs" ></div>
212
				<div class="row">
213
					<div class="zone-alerte">
214
						<div id="dialogue-zero-obs" class="alert alert-block hidden">
215
							<a class="close">×</a>
216
							<h4 class="alert-heading"><?php echo $resume['alert0obs']; ?></h4>
217
							<p><?php echo $resume['alert0obs-desc']; ?></p>
218
						</div>
219
						<div id="dialogue-obs-transaction-ok" class="alert alert-success alert-block hidden">
220
							<a class="close">×</a>
221
							<h4 class="alert-heading"><?php echo $resume['info-trans']; ?></h4>
222
							<div class="alert-txt"></div>
223
						</div>
224
						<div id="dialogue-obs-transaction-ko" class="alert alert-error alert-block hidden">
225
							<a class="close">×</a>
226
							<h4 class="alert-heading"><?php echo $resume['alerttrans']; ?></h4>
227
							<div class="alert-txt"></div>
228
						</div>
229
					</div>
230
				</div>
231
			</div>
232
 
233
			<!-- Fenêtres modales -->
234
			<div id="chargement" class="modal-fenetre hidden">
235
				<div id="chargement-centrage" class="modal-contenu">
236
					<div class="progress progress-striped active">
237
						<div id="barre-progression-upload" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="10" style="">
238
								<span class="sr-only">0/10 <?php echo $resume['nbobs']; ?></span>
239
							</div>
240
					</div>
241
					<p id="chargement-txt">
242
						<?php echo $resume['transencours']; ?>
243
					</p>
244
				</div>
245
			</div>
246
 
247
			<!-- Templates HTML -->
248
			<div id="tpl-transmission-ok" class="hidden">
249
				<p class="msg"><?php echo $resume['transok']; ?></p>
250
			</div>
251
			<div id="tpl-transmission-ko" class="hidden">
252
				<p class="msg"><?php echo $resume['transko']; ?></p>
253
			</div>
254
		</div><!-- fin lichens zone résumé obs ( =zone de droite ) -->
255
	</div>
256
	<script type="text/javascript">
257
		releve = null;
258
		lichens = null;
259
		lichens = new LichensLg();
260
 
261
				// La présence du parametre 'debug' dans l'URL enclenche le débogage
262
				lichens.debug = <?php echo isset( $_GET['debug'] ) ? 'true' : 'false'; ?>;
263
				// La présence du parametre 'html5' dans l'URL enclenche les fonctions avancées HTML5
264
				lichens.html5 = <?php echo isset($_GET['html5']) ? 'true' : 'false'; ?>;
265
				// Mot-clé du widget/projet
266
				lichens.tagProjet = "WidgetLg,lichens";
267
				// Mots-clés à ajouter aux images
268
				lichens.tagImg = "<?php echo isset($_GET['tag-img']) ? $_GET['tag-img'] : ''; ?>";
269
				lichens.separationTagImg = "<?php echo isset($_GET['motcle']) && isset($_GET['tag-img']) ? ',' : ''; ?>";
270
				lichens.tagImg = <?php echo isset($_GET['motcle']) ? "'".$_GET['motcle']."' + lichens.separationTagImg + lichens.tagImg" : 'lichens.tagImg'; ?>;
271
				// Mots-clés à ajouter aux observations
272
				lichens.tagObs = "<?php echo isset($_GET['tag-obs']) ? $_GET['tag-obs'] : ''; ?>";
273
				lichens.separationTagObs = "<?php echo isset($_GET['projet']) && isset($_GET['tag-obs']) ? ',' : ''; ?>";
274
				lichens.tagObs = <?php echo isset($_GET['projet']) ? "'".$_GET['projet']."' + lichens.separationTagObs + lichens.tagObs" : 'lichens.tagObs'; ?>;
275
				// URL du web service réalisant l'insertion des données dans la base du CEL.
276
				lichens.serviceSaisieUrl = "<?php echo $url_ws_lg; ?>";
277
 
278
				// URL de l'icône du chargement en cours d'une image
279
				lichens.chargementImageIconeUrl = "<?php echo $url_base; ?>img/icones/chargement-image.gif";
280
				// URL de l'icône pour une photo manquante
281
				lichens.pasDePhotoIconeUrl = "<?php echo $url_base; ?>img/icones/pasdephoto.png";
282
 
283
				// Code du référentiel utilisé pour les nom scientifiques.
284
				lichens.nomSciReferentiel = "<?php echo strtolower( $widget['referentiel'] ); ?>";
285
				// Nombre d'élément dans les listes d'auto-complétion
286
				lichens.autocompletionElementsNbre = 20;
287
				// Indication de la présence d'un référentiel imposé
288
				lichens.referentielImpose = "<?php echo $referentiel_impose; ?>";
289
 
290
				// URL du web service permettant l'auto-complétion des noms scientifiques
291
				lichens.serviceAutocompletionNomSciUrl = "<?php echo $widget['especes']['url_ws_autocompletion_ns']; ?>?"+
292
					"masque={masque}&"+
293
					"recherche=etendue&"+
294
					"retour.champs=famille,nom_retenu,nom_retenu_complet,num_taxonomique,nom_retenu.id&"+
295
					"ns.structure=au&"+
296
					"navigation.limite=" + lichens.autocompletionElementsNbre;
297
				// Squelette d'URL du web service permettant l'auto-complétion des noms scientifiques
298
				lichens.serviceAutocompletionNomSciUrlTpl = "<?php echo $widget['especes']['url_ws_autocompletion_ns_tpl']; ?>?"+
299
					"masque={masque}&"+
300
					"recherche=etendue&"+
301
					"retour.champs=famille,nom_retenu,nom_retenu_complet,num_taxonomique,nom_retenu.id&"+
302
					"retour.tri=alpharet&"+ // tri "à la CeL"
303
					"ns.structure=au&"+
304
					"navigation.limite=" + lichens.autocompletionElementsNbre;
305
				// Nombre d'observations max autorisé avant transmission
306
				lichens.obsMaxNbre = 10;
307
				// Durée d'affichage en milliseconde des messages d'informations
308
				lichens.dureeMessage = 10000;
309
 
310
				// Initialisation du bousin
311
				lichens.init();
312
	</script>
313
</div>