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