Subversion Repositories eFlore/Applications.cel

Rev

Rev 3380 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<div id="zone-lichens" class="bloc-top">
        <h2 class="mb-3"><?php echo $lichens['titre']; ?></h2>
        <div id="bouton-poursuivre" class="btn btn-success hidden mb-3" data-load="lichens">
                <i class="far fa-plus-square"></i>&nbsp;<?php echo $lichens['poursuivre-lichens']; ?>
        </div>
        <div class="row">
                <div id="bloc-gauche" class="col-md-6">
                        <div id="bloc-form-lichens" class="">
                                <form id="form-lichens" role="form" autocomplete="off">
                                        <div class="control-group">
                                                <label for="choisir-arbre" class="col-sm-8 obligatoire" title="<?php echo $lichens['arbre-title']; ?>">
                                                        <i class="fas fa-tree" aria-hidden="true"></i>
                                                        <?php echo $general['arbre']; ?>
                                                </label>
                                                <div class="col-sm-8 mb-3">
                                                        <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>
                                                                <option value="" selected hidden><?php echo $general['numero-arbre']; ?></option>
                                                        </select>
                                                </div>
                                        </div>

                                        <div class="control-group">
                                                <label for="obs-date" class="col-sm-8 obligatoire" title="">
                                                        <i class="fa fa-calendar" aria-hidden="true"></i>
                                                        <?php echo $general['date']; ?>
                                                </label>
                                                <div class="col-sm-8 mb-3">
                                                        <input type="date" id="obs-date" name="obs-date" class="form-control" max="" placeholder="jj/mm/aaaa" required>
                                                </div>
                                        </div>

                                        <input id="referentiel" name="referentiel" value="<?php echo $widget['referentiel']; ?>" type="hidden">

                                        <div id="bloc-taxon" class="control-group">
                                                <label for="taxon-liste" class="col-sm-8 obligatoire" title="">
                                                        <i class="fa fa-leaf" aria-hidden="true"></i>
                                                        <?php echo $general['espece']; ?><!-- (<?php echo $widget['referentiel']; ?>)-->
                                                </label>
                                                <div class="col-sm-8 mb-3">
                                                        <?php ksort( $widget['especes']['taxons'] ); ?>
                                                        <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']; ?>">
                                                                <option class="choisir" value="inconnue" selected hidden><?php echo $general['choisir']; ?></option>
                                                                <?php foreach ($widget['especes']['taxons'] as $taxon)  : ?>
                                                                        <option
                                                                                class="nom-sci"
                                                                                value="<?php echo $taxon['nom_sel'];?>"
                                                                                title="<?php echo $taxon['nom_fr'];?>"
                                                                                data-num-nom-sel="<?php echo $taxon['num_nom_sel'];?>"
                                                                                data-nom-ret="<?php echo $taxon['nom_ret'];?>"
                                                                                data-num-nom-ret="<?php echo $taxon['num_nom_ret'];?>"
                                                                                data-nt="<?php echo $taxon['num_taxon'];?>"
                                                                                data-famille="<?php echo $taxon['famille'];?>"
                                                                        ><?php echo $taxon['nom_sel'];?></option>
                                                                <?php endforeach; ?>
                                                                <option value="autre"><?php echo $general['autre-espece']; ?></option>
                                                        </select>
                                                        <span for="taxon-liste" class="error" style="display: none;"><?php echo $observation['error-taxon'];?></span>
                                                        <input id="taxon" name="taxon" type="hidden" />
                                                </div>
                                        </div>
                                        <div id="taxon-input-groupe" class="control-group hidden">
                                                <label for="taxon-autre" class="col-sm-8" title="">
                                                        <i class="fab fa-pagelines" aria-hidden="true"></i>
                                                        <?php echo $general['autre-espece']; ?>
                                                </label>
                                                <div class="col-sm-8 mb-3">
                                                        <input id="taxon-autre" name="taxon-autre" class="form-control has-tooltip" type="text" data-toggle="tooltip" title="<?php echo $observation['espece-title']; ?>">
                                                </div>
                                        </div>

                                        <div class="control-group">
                                                <label for="certitude" class="col-sm-8 obligatoire" title="">
                                                        <i class="fa fa-question" aria-hidden="true"></i>
                                                        <?php echo $general['certitude']; ?>
                                                </label>
                                                <div class="col-sm-8 mb-3">
                                                        <select id="certitude" name="certitude" class="form-control custom-select" required>
                                                                <option value="" hidden selected><?php echo $general['choisir']; ?></option>
                                                                <option value="à déterminer" class="aDeterminer"><?php echo $general['certADet']; ?></option>
                                                                <option value="douteuse" class="douteuse"><?php echo $general['certDout']; ?></option>
                                                                <option value="certaine" class="certaine"><?php echo $general['certCert']; ?></option>
                                                        </select>
                                                </div>
                                        </div>
                                        <div class="control-group">
                                                <div class="col-sm-8 mb-2 list-label obligatoire" title="<?php echo $lichens['loc-tronc-title']; ?>">
                                                        <i class="fas fa-cube" aria-hidden="true"></i>
                                                        <?php echo $lichens['loc-tronc']; ?>
                                                </div>
                                                <table class="table col-sm-8">
                                                  <thead>
                                                        <tr>
                                                          <th scope="col">Face :</th>
                                                          <th scope="col"><?php echo $general['nord']; ?></th>
                                                          <th scope="col"><?php echo $general['est']; ?></th>
                                                          <th scope="col"><?php echo $general['sud']; ?></th>
                                                          <th scope="col"><?php echo $general['ouest']; ?></th>
                                                        </tr>
                                                  </thead>
                                                  <tbody>
                                                        <tr>
                                                          <th scope="row">1 (haut)</th>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-n1" value="n1"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-s1" value="s1"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-e1" value="e1"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-o1" value="o1"></td>
                                                        </tr>
                                                        <tr>
                                                          <th scope="row">2</th>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-n2" value="n2"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-s2" value="s2"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-e2" value="e2"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-o2" value="o2"></td>
                                                        </tr>
                                                        <tr>
                                                          <th scope="row">3</th>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-n3" value="n3"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-s3" value="s3"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-e3" value="e3"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-o3" value="o3"></td>
                                                        </tr>
                                                        <tr>
                                                          <th scope="row">4</th>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-n4" value="n4"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-s4" value="s4"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-e4" value="e4"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-o4" value="o4"></td>
                                                        </tr>
                                                        <tr>
                                                          <th scope="row">5 (bas)</th>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-n5" value="n5"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-s5" value="s5"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-e5" value="e5"></td>
                                                          <td><input type="checkbox" name="lichens-tronc" id="lichens-tronc-o5" value="o5"></td>
                                                        </tr>
                                                  </tbody>
                                                </table>
                                        </div>

                                        <div class="">
                                                <label for="commentaire" class="col-sm-8" title="">
                                                        <i class="fa fa-pen" aria-hidden="true"></i>
                                                        <?php echo $general['commentaires']; ?>
                                                </label>
                                                <div class="col-sm-8 mb-3">
                                                        <textarea id="commentaire" class="col-md-12" rows="7" name="commentaire"></textarea>
                                                </div>
                                        </div>
                                </form>
                                <form id="form-upload" class="form-horizontal" action="<?php echo $url_ws_upload ?>" method="post" enctype="multipart/form-data">
                                        <div class="col-sm-8 mb-2 list-label and-help">
                                                <i class="fa fa-images" aria-hidden="true"></i>
                                                <?php echo $lichens['titre-photos']; ?>
                                        </div>
                                        <p id="miniature-info" class="col-sm-8">
                                                <?php echo $image['aide']; ?>
                                        </p>
                                        <div id ="photos-conteneur" class="control-group col-sm-8">
                                                <div id="bouton-fichier">
                                                        <label for="fichier" class="label-file btn btn-large btn-info mb-3" title="<?php echo $image['photos-title']; ?>">
                                                                <span class="label-text"><i class="fas fa-download"></i> <?php echo $image['ajouter']; ?></span>
                                                                <input type="file" id="fichier" name="fichier" class="input-file" accept="image/jpeg" multiple>
                                                                <input type="hidden" name="MAX_FILE_SIZE" value="5242880">
                                                        </label>
                                                </div>

                                                <div id="miniatures"></div>
                                                <p class="miniature-msg" class="span12">&nbsp;</p>
                                        </div>
                                </form>
                                <!-- Bouton création d'une obs -->
                                <div class="col-sm-8 mb-3">
                                        <div title="<?php echo $resume['creer-title']; ?>">
                                                <button id="ajouter-obs" class="btn btn-primary"><i class="fas fa-step-forward"></i> <?php echo $general['suivant']; ?></button>
                                        </div>
                                </div>
                        </div>
                </div><!-- fin formulaire lichens -->
                <!-- zone résumé obs lichens ( =zone de droite) -->
                <div id="bloc-lichens-droite" class="col-md-6">
                        <!-- Messages d'erreur du formulaire -->
                        <div class="row">
                                <div class="zone-alerte">
                                        <div id="dialogue-bloquer-creer-obs" class="alert alert-warning alert-block hidden">
                                                <a class="close">×</a>
                                                <h4 class="alert-heading"><?php echo $resume['alert10max']; ?></h4>
                                                <p><?php echo $resume['alert10max-desc']; ?></p>
                                        </div>
                                        <div id="dialogue-form-invalide" class="alert alert-warning alert-block hidden">
                                                <a class="close">×</a>
                                                <h4 class="alert-heading"><?php echo $resume['alertchp']; ?></h4>
                                                <p><?php echo $resume['alertchp-desc']; ?></p>
                                        </div>
                                        <div id="dialogue-taxon-or-image" class="alert alert-warning alert-block hidden">
                                                <a class="close">×</a>
                                                <h4 class="alert-heading"><?php echo $observation['alert-img-tax-title']; ?></h4>
                                                <p><?php echo $lichens['alert-img-tax']; ?></p>
                                        </div>
                                </div>
                        </div>

                        <!-- Affiche le tableau récapitualif des observations ajoutées -->
                        <div id="zone-liste-obs" class="">
                                <div id="bloc-controle-liste-obs" class="alert alert-info">
                                        <h2 class="transmission-title"><strong><?php echo $resume['titre']; ?> <span class="obs-nbre badge badge-info">0</span></strong></h2>
                                        <button id="transmettre-obs" class="btn btn-primary has-tooltip" data-toggle="tooltip" disabled="disabled"
                                                title="<?php echo $resume['trans-title']; ?>" type="button">
                                                <?php echo $general['enregistrer']; ?>
                                        </button>
                                </div>
                                <div id="liste-obs" ></div>
                                <div class="row">
                                        <div class="zone-alerte">
                                                <div id="dialogue-zero-obs" class="alert alert-block hidden">
                                                        <a class="close">×</a>
                                                        <h4 class="alert-heading"><?php echo $resume['alert0obs']; ?></h4>
                                                        <p><?php echo $resume['alert0obs-desc']; ?></p>
                                                </div>
                                                <div id="dialogue-obs-transaction-ok" class="alert alert-success alert-block hidden">
                                                        <a class="close">×</a>
                                                        <h4 class="alert-heading"><?php echo $resume['info-trans']; ?></h4>
                                                        <div class="alert-txt"></div>
                                                </div>
                                                <div id="dialogue-obs-transaction-ko" class="alert alert-error alert-block hidden">
                                                        <a class="close">×</a>
                                                        <h4 class="alert-heading"><?php echo $resume['alerttrans']; ?></h4>
                                                        <div class="alert-txt"></div>
                                                </div>
                                        </div>
                                </div>
                        </div>

                        <!-- Fenêtres modales -->
                        <div id="chargement" class="modal-fenetre hidden">
                                <div id="chargement-centrage" class="modal-contenu">
                                        <div class="progress progress-striped active">
                                                <div id="barre-progression-upload" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="10" style="">
                                                                <span class="sr-only">0/10 <?php echo $resume['nbobs']; ?></span>
                                                        </div>
                                        </div>
                                        <p id="chargement-txt">
                                                <?php echo $resume['transencours']; ?>
                                        </p>
                                </div>
                        </div>

                        <!-- Templates HTML -->
                        <div id="tpl-transmission-ok" class="hidden">
                                <p class="msg"><?php echo $resume['transok']; ?></p>
                        </div>
                        <div id="tpl-transmission-ko" class="hidden">
                                <p class="msg"><?php echo $resume['transko']; ?></p>
                        </div>
                </div><!-- fin lichens zone résumé obs ( =zone de droite ) -->
        </div>
        <script type="text/javascript">
                releve = null;
                lichens = null;
                lichens = new LichensLg();

                                // La présence du parametre 'debug' dans l'URL enclenche le débogage
                                lichens.debug = <?php echo isset( $_GET['debug'] ) ? 'true' : 'false'; ?>;
                                // La présence du parametre 'html5' dans l'URL enclenche les fonctions avancées HTML5
                                lichens.html5 = <?php echo isset($_GET['html5']) ? 'true' : 'false'; ?>;
                                // Mot-clé du widget/projet
                                lichens.tagProjet = "WidgetLg,lichens";
                                // Mots-clés à ajouter aux images
                                lichens.tagImg = "<?php echo isset($_GET['tag-img']) ? $_GET['tag-img'] : ''; ?>";
                                lichens.separationTagImg = "<?php echo isset($_GET['motcle']) && isset($_GET['tag-img']) ? ',' : ''; ?>";
                                lichens.tagImg = <?php echo isset($_GET['motcle']) ? "'".$_GET['motcle']."' + lichens.separationTagImg + lichens.tagImg" : 'lichens.tagImg'; ?>;
                                // Mots-clés à ajouter aux observations
                                lichens.tagObs = "<?php echo isset($_GET['tag-obs']) ? $_GET['tag-obs'] : ''; ?>";
                                lichens.separationTagObs = "<?php echo isset($_GET['projet']) && isset($_GET['tag-obs']) ? ',' : ''; ?>";
                                lichens.tagObs = <?php echo isset($_GET['projet']) ? "'".$_GET['projet']."' + lichens.separationTagObs + lichens.tagObs" : 'lichens.tagObs'; ?>;
                                // URL du web service réalisant l'insertion des données dans la base du CEL.
                                lichens.serviceSaisieUrl = "<?php echo $url_ws_lg; ?>";

                                // URL de l'icône du chargement en cours d'une image
                                lichens.chargementImageIconeUrl = "<?php echo $url_base; ?>img/icones/chargement-image.gif";
                                // URL de l'icône pour une photo manquante
                                lichens.pasDePhotoIconeUrl = "<?php echo $url_base; ?>img/icones/pasdephoto.png";

                                // Code du référentiel utilisé pour les nom scientifiques.
                                lichens.nomSciReferentiel = "<?php echo strtolower( $widget['referentiel'] ); ?>";
                                // Nombre d'élément dans les listes d'auto-complétion
                                lichens.autocompletionElementsNbre = 20;
                                // Indication de la présence d'un référentiel imposé
                                lichens.referentielImpose = "<?php echo $referentiel_impose; ?>";

                                // URL du web service permettant l'auto-complétion des noms scientifiques
                                lichens.serviceAutocompletionNomSciUrl = "<?php echo $widget['especes']['url_ws_autocompletion_ns']; ?>?"+
                                        "masque={masque}&"+
                                        "recherche=etendue&"+
                                        "retour.champs=famille,nom_retenu,nom_retenu_complet,num_taxonomique,nom_retenu.id&"+
                                        "ns.structure=au&"+
                                        "navigation.limite=" + lichens.autocompletionElementsNbre;
                                // Squelette d'URL du web service permettant l'auto-complétion des noms scientifiques
                                lichens.serviceAutocompletionNomSciUrlTpl = "<?php echo $widget['especes']['url_ws_autocompletion_ns_tpl']; ?>?"+
                                        "masque={masque}&"+
                                        "recherche=etendue&"+
                                        "retour.champs=famille,nom_retenu,nom_retenu_complet,num_taxonomique,nom_retenu.id&"+
                                        "retour.tri=alpharet&"+ // tri "à la CeL"
                                        "ns.structure=au&"+
                                        "navigation.limite=" + lichens.autocompletionElementsNbre;
                                // Nombre d'observations max autorisé avant transmission
                                lichens.obsMaxNbre = 10;
                                // Durée d'affichage en milliseconde des messages d'informations
                                lichens.dureeMessage = 10000;

                                // Initialisation du bousin
                                lichens.init();
        </script>
</div>