Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 3248 Rev 3249
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
									<label for="taxon" class="col-sm-8 obligatoire" title="">
269
									<label for="taxon" class="col-sm-8" title="">
270
										<i class="fa fa-leaf" aria-hidden="true"></i>
270
										<i class="fa fa-leaf" aria-hidden="true"></i>
271
										<?php echo $observation['espece']; ?><?php if ( $widget['referentiel'] !== '' && $widget['referentiel'] !== NULL ) echo " (" . $widget['referentiel'] . ")"; ?>
271
										<?php echo $observation['espece']; ?><?php if ( $widget['referentiel'] !== '' && $widget['referentiel'] !== NULL ) echo " (" . $widget['referentiel'] . ")"; ?>
272
									</label>
272
									</label>
273
									<div class="col-sm-8 mb-3">
273
									<div class="col-sm-8 mb-3">
274
										<input id="taxon" name="taxon" class="form-control" type="text" required>
274
										<input id="taxon" name="taxon" class="form-control" type="text">
275
									</div>
275
									</div>
Line 276... Line 276...
276
								</div>
276
								</div>
277
 
277
 
Line 326... Line 326...
326
							<div id="zone-supp" class="row">
326
							<div id="zone-supp" class="row">
327
								<div class="col-md-6">
327
								<div class="col-md-6">
Line 328... Line 328...
328
 
328
 
329
									<?php foreach( $widget['chpSupp'][ $widget['projet'] ]['champs-supp'] as $champ ) : ?>
329
									<?php foreach( $widget['chpSupp'][ $widget['projet'] ]['champs-supp'] as $champ ) : ?>
330
										<?php
330
										<?php
331
											$min         = ( $champ['fieldValues']['min'] )? ' min="' . $champ['fieldValues']['min'] . '"':'';
331
											$min         = ( isset( $champ['fieldValues']['min'] ) )? ' min="' . $champ['fieldValues']['min'] . '"':'';
332
											$max         = ( $champ['fieldValues']['max'] )? ' max="' . $champ['fieldValues']['max'] . '"':'';
332
											$max         = ( isset( $champ['fieldValues']['max'] ) )? ' max="' . $champ['fieldValues']['max'] . '"':'';
333
											$step        = ( $champ['fieldValues']['step'] )? ' step="' . $champ['fieldValues']['step'] . '"':'';
333
											$step        = ( isset( $champ['fieldValues']['step'] ) )? ' step="' . $champ['fieldValues']['step'] . '"':'';
334
											$default     = ( $champ['fieldValues']['default'] )? ' value="' . $champ['fieldValues']['default'] . '"':'';
334
											$default     = ( isset( $champ['fieldValues']['default'] ) )? ' value="' . $champ['fieldValues']['default'] . '"':'';
335
											$description = ( $champ['description'] )? ' title="' . $champ['description'] . '"':'';
335
											$description = ( isset( $champ['description'] ) )? ' title="' . $champ['description'] . '"':'';
336
											$placeholder = ( $champ['fieldValues']['placeholder'] )? ' placeholder="' . $champ['fieldValues']['placeholder'] . '"':'';
336
											$placeholder = ( isset( $champ['fieldValues']['placeholder'] ) )? ' placeholder="' . $champ['fieldValues']['placeholder'] . '"':'';
337
											$required    = '';
337
											$required    = '';
338
											$mandatory   = '';
338
											$mandatory   = '';
339
											$pattern     = '';
339
											$pattern     = '';
340
											$obs_radio   = '';
340
											$obs_radio   = '';
Line 475... Line 475...
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>
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>
476
														<div class="col-sm-8 mb-3 row">
476
														<div class="col-sm-8 mb-3 row">
477
															<?php
477
															<?php
478
																$div_range_min_max = '';
478
																$div_range_min_max = '';
Line 479... Line 479...
479
 
479
 
480
																if ( $champ['fieldValues']['min'] )  {
480
																if ( isset( $champ['fieldValues']['min'] ) )  {
481
																	$div_range_min_max =
481
																	$div_range_min_max =
482
																		"<p class=\"col-sm-2 range-values text-center font-weight-bold\">".
482
																		"<p class=\"col-sm-2 range-values text-center font-weight-bold\">".
483
																			"Min " . $champ['fieldValues']['min'] .
483
																			"Min " . $champ['fieldValues']['min'] .
484
																		"</p>";
484
																		"</p>";
Line 485... Line 485...
485
																}
485
																}
Line 486... Line 486...
486
 
486
 
487
																$div_range_min_max .= '<div class="range-live-value range-values text-center font-weight-bold col-sm-';
487
																$div_range_min_max .= '<div class="range-live-value range-values text-center font-weight-bold col-sm-';
488
 
488
 
489
																if ( $champ['fieldValues']['min'] && $champ['fieldValues']['max'] ) {
489
																if ( isset( $champ['fieldValues']['min'] ) && isset( $champ['fieldValues']['max'] ) ) {
490
																	$div_range_min_max .= '8';
490
																	$div_range_min_max .= '8';
491
																} elseif ( $champ['fieldValues']['min'] || $champ['fieldValues']['max'] ) {
491
																} elseif ( isset( $champ['fieldValues']['min'] ) || isset( $champ['fieldValues']['max'] ) ) {
492
																	$div_range_min_max .= '10';
492
																	$div_range_min_max .= '10';
Line 493... Line 493...
493
																} else {
493
																} else {
Line 494... Line 494...
494
																	$div_range_min_max .= '12';
494
																	$div_range_min_max .= '12';
495
																}
495
																}
496
 
496
 
497
																$div_range_min_max .= '"></div>';
497
																$div_range_min_max .= '"></div>';
498
 
498
 
499
																if( $champ['fieldValues']['max'] ) {
499
																if( isset( $champ['fieldValues']['max'] ) ) {
Line 669... Line 669...
669
			tbGeolocation.addEventListener( 'location', function( location ) {
669
			tbGeolocation.addEventListener( 'location', function( location ) {
670
				console.log( location.detail );
670
				console.log( location.detail );
671
				var locationDatas = location.detail;
671
				var locationDatas = location.detail;
672
				var latitude = '';
672
				var latitude = '';
673
				var longitude = '';
673
				var longitude = '';
674
				if ( undefined !== locationDatas.geometry.features ) {
674
				if ( undefined !== locationDatas.geometry.features ) {// rue
675
					latitude = ( locationDatas.geometry.features[0].geometry.coordinates[0][1] + locationDatas.geometry.features[0].geometry.coordinates[1][1]) / 2;
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;
676
					longitude = ( locationDatas.geometry.features[0].geometry.coordinates[0][0] + locationDatas.geometry.features[0].geometry.coordinates[1][0]) / 2;
677
				} else  if ( undefined !== locationDatas.geometry.coordinates ) {
677
				} else  if ( undefined !== locationDatas.geometry.coordinates ) {// point
678
					latitude = locationDatas.geometry.coordinates[1];
678
					latitude = locationDatas.geometry.coordinates[1];
679
					longitude = locationDatas.geometry.coordinates[0];
679
					longitude = locationDatas.geometry.coordinates[0];
680
				}
680
				}
Line 681... Line 681...
681
 
681