New file |
0,0 → 1,82 |
<!-- DEBUT FORM_NOM --> |
<script type="text/javascript"> |
<!-- |
var AUTOCOMPLETION_ELEMENTS_NBRE = 50; |
var URL_SERVICE_AUTOCOMPLETION_NOM_SCI_TPL = "<?= $efloreRechercheSciUrlTpl; ?>"; |
var URL_SERVICE_AUTOCOMPLETION_NOM_VERNA_TPL = "<?= $efloreRechercheVernaUrlTpl; ?>"; |
var VALEUR_DEFAUT_NOM_SCI = "Saisir un nom scientifique (sans auteur)"; |
var VALEUR_DEFAUT_NOM_VERNA = "Saisir un nom commun"; |
var VALEUR_DEFAUT_AU = ""; |
var VALEUR_DEFAUT_BIB = ""; |
var VALEUR_DEFAUT_DATE = ""; |
var URL_BASE_FICHE_TAXON = "<?= $ficheTaxonUrlTpl; ?>"; |
<?php $js = json_encode($referentielsVernasDispos); ?> |
var REFERENTIELS_VERNA_DISPOS = <?= $js ; ?>; |
var URL_SERVICE_AUTOCOMPLETION_NOM_SCI = "<?= $efloreRechercheSciUrlDefaut; ?>"; |
var URL_SERVICE_AUTOCOMPLETION_NOM_VERNA = "<?= $efloreRechercheVernaUrlDefaut; ?>"; |
|
function gererVisibiliteSelecteurNom() { |
ref_sci = $("input[name=referentiel]:checked").val(); |
URL_SERVICE_AUTOCOMPLETION_NOM_SCI = URL_SERVICE_AUTOCOMPLETION_NOM_SCI_TPL.replace("{referentiel}", ref_sci); |
if(REFERENTIELS_VERNA_DISPOS[ref_sci] != undefined) { |
URL_SERVICE_AUTOCOMPLETION_NOM_VERNA = URL_SERVICE_AUTOCOMPLETION_NOM_VERNA_TPL.replace("{referentiel}", REFERENTIELS_VERNA_DISPOS[ref_sci]); |
$("#type_nom_vernaculaire").parent().css("visibility","visible"); |
} else { |
$("#type_nom_vernaculaire").parent().css("visibility","hidden"); |
$("#type_nom_scientifique").attr('checked', 'checked'); |
$('#nom').val(); |
$('#nom').attr("placeholder", ""); |
} |
} |
|
function initialiser() { |
$.getScript("<?= $efloreScriptUrl; ?>").done(function(script, textStatus) { |
// la fonction initialiserMoteur est la fonction d'initialisation du script de recherche tiré d'eflore |
// elle utilise les variable définies ci dessus, et elle est donc chargée après. |
initialiserMoteur(); |
$("input[name=referentiel]").change(function () { |
gererVisibiliteSelecteurNom(); |
}); |
gererVisibiliteSelecteurNom(); |
}); |
} |
|
// --> |
</script> |
<div class="importance1" id="conteneur-recherche"> |
<h1 class="titre-widget">Rechercher un nom</h1> |
<form id="ef-form-nomenclature" name="ef-form-nomenclature" action="<?= $efloreConsultationUrl; ?>" method="get"> |
<fieldset> |
<div class="zone-choix-referentiel"> |
<label class="label-referentiel">Référentiel :</label> |
<?php $premier_ref = true; ?> |
<?php foreach($referentielsSciDispos as $ref_sci) : ?> |
<span class="referentiel"> |
<input type="radio" class="selection-referentiel" id="referentiel_<?= $ref_sci ?>" name="referentiel" value="<?= $ref_sci; ?>" <?= $premier_ref ? 'checked="checked"' : ""; ?> /> |
<label for="referentiel_<?= $ref_sci; ?>"><?= $ref_sci; ?></label> |
</span> |
<?php $premier_ref = false; ?> |
<?php endforeach; ?> |
</div> |
<span class="zone-choix-type-nom"> |
<span class="type-nom"> |
<input type="radio" id="type_nom_scientifique" name="type_nom" value="nom_scientifique" checked="checked" /> |
<label for="type_nom_scientifique">Nom scientifique</label> |
</span> |
<span class="type-nom"> |
<input type="radio" id="type_nom_vernaculaire" name="type_nom" value="nom_vernaculaire" /> |
<label for="type_nom_vernaculaire" title="(en français, allemand, anglais, catalan, espagnol, italien ou néerlandais)">Nom commun</label> |
</span> |
</span> |
<input type="text" aria-haspopup="true" aria-autocomplete="list" role="textbox" autocomplete="off" id="nom" name="nom" class="champ ui-autocomplete-input" size="30" maxlength="255" /> |
<span id="zone-liens-recherche"> |
<input type="hidden" id="eflore_nomenclature_niveau" name="niveau" value="2" /> |
<input type="hidden" id="eflore_nomenclature_module" name="module" value="recherche" /> |
<input type="hidden" id="eflore_nomenclature_action" name="action" value="rechercheSimple" /> |
<input type="submit" id="eflore_nomenclature_submit" name="submit" value="OK" class="ok" /> |
<input type="submit" id="eflore_nomenclature_fiche" name="acces_fiche" value="Accès fiche" /> |
</span> |
</fieldset> |
</form> |
</div> |
<!-- FIN FORM_NOM --> |