/trunk/papyrus/applettes/moteur_recherche/squelettes/formulaire_extensible.tpl.html |
---|
New file |
0,0 → 1,12 |
<?php |
// Le code javascript pour le basculement de taille doit être mis dans un fichier js à part |
// Les fonctions nécessaires sont disponibles dans le fichier de template : formulaire_extensible_js.tpl.html |
?> |
<form action="<?=$form_url;?>" method="post" id="form_more_recherche"> |
<fieldset> |
<legend><?=MORE_LG_FORM_TITRE;?></legend> |
<label for="more_motif"><?=MORE_LG_FORM_MOTIF;?></label> |
<input id="more_motif" name="more_motif" tabindex="<?=$form_tab;?>" maxlength="<?=MORE_FORM_MOTIF_MAXLENGTH;?>" accesskey="<?=MORE_LG_FORM_ACCESSKEY;?>" type="text" value="<?=$more_motif;?>" onfocus="nettoyerChamp('more_motif', '<?=$more_motif_base;?>');basculerTaille('more_motif', true);" onblur="nettoyerChamp('more_motif', '<?=$more_motif_base;?>');basculerTaille('more_motif', false);" /> |
<input id="more_ok" name="more_ok" tabindex="<?=++$form_tab;?>" value="<?=MORE_LG_FORM_VALIDER;?>" type="submit" /> |
</fieldset> |
</form> |
/trunk/papyrus/applettes/moteur_recherche/squelettes/formulaire_extensible_js.tpl.html |
---|
New file |
0,0 → 1,40 |
<?php |
// Le code javascript pour le basculement de taille est directement dans le template utiliser plutôt le squelette formulaire_extensible.tpl.html |
// en mettant le code js dans un fichier à part si le moteur de recherche est accessible depuis de nombreuses pages du site. |
?> |
<form action="<?=$form_url;?>" method="post" id="form_more_recherche"> |
<fieldset> |
<legend><?=MORE_LG_FORM_TITRE;?></legend> |
<label for="more_motif"><?=MORE_LG_FORM_MOTIF;?></label> |
<input id="more_motif" name="more_motif" tabindex="<?=$form_tab;?>" maxlength="<?=MORE_FORM_MOTIF_MAXLENGTH;?>" accesskey="<?=MORE_LG_FORM_ACCESSKEY;?>" type="text" value="<?=$more_motif;?>" onfocus="nettoyerChamp('more_motif', '<?=$more_motif_base;?>');basculerTaille('more_motif', true);" onblur="nettoyerChamp('more_motif', '<?=$more_motif_base;?>');basculerTaille('more_motif', false);" /> |
<input id="more_ok" name="more_ok" tabindex="<?=++$form_tab;?>" value="<?=MORE_LG_FORM_VALIDER;?>" type="submit" /> |
</fieldset> |
</form> |
<script type="text/javascript"> |
//<![CDATA[ |
// Fonction aggrandissant ou diminuant la taille d'un champ |
// Provient du site https://addons.mozilla.org/ |
function basculerTaille(id, grand) |
{ |
var sb = document.getElementById(id); |
if (grand) { |
sb.style.width = '20em;'; |
} else { |
sb.style.width = '10em;'; |
} |
} |
// Fonction nettoyant un champ de formulaire d'une chaine donnée... |
function nettoyerChamp(id, chaine) |
{ |
var sb = document.getElementById(id); |
var valeur = sb.value; |
if (valeur == chaine) { |
sb.value = ''; |
} |
if (valeur == '') { |
sb.value = chaine; |
} |
} |
//]]> |
</script> |
/trunk/papyrus/applettes/moteur_recherche/squelettes/formulaire.tpl.html |
---|
2,35 → 2,7 |
<fieldset> |
<legend><?=MORE_LG_FORM_TITRE;?></legend> |
<label for="more_motif"><?=MORE_LG_FORM_MOTIF;?></label> |
<input id="more_motif" name="more_motif" tabindex="<?=$form_tab;?>" maxlength="<?=MORE_FORM_MOTIF_MAXLENGTH;?>" accesskey="<?=MORE_LG_FORM_ACCESSKEY;?>" type="text" value="<?=$more_motif;?>" onfocus="nettoyerChamp('more_motif', '<?=$more_motif_base;?>');basculerTaille('more_motif', true);" onblur="nettoyerChamp('more_motif', '<?=$more_motif_base;?>');basculerTaille('more_motif', false);" /> |
<input id="more_motif" name="more_motif" tabindex="<?=$form_tab;?>" maxlength="<?=MORE_FORM_MOTIF_MAXLENGTH;?>" accesskey="<?=MORE_LG_FORM_ACCESSKEY;?>" type="text" value="<?=$more_motif;?>" /> |
<input id="more_ok" name="more_ok" tabindex="<?=++$form_tab;?>" value="<?=MORE_LG_FORM_VALIDER;?>" type="submit" /> |
</fieldset> |
</form> |
<script type="text/javascript"> |
//<![CDATA[ |
// Fonction aggrandissant ou diminuant la taille d'un champ |
// Provient du site https://addons.mozilla.org/ |
function basculerTaille(id, grand) |
{ |
var sb = document.getElementById(id); |
if (grand) { |
sb.style.width = '20em;'; |
} else { |
sb.style.width = '10em;'; |
} |
} |
// Fonction nettoyant un champ de formulaire d'une chaine donnée... |
function nettoyerChamp(id, chaine) |
{ |
var sb = document.getElementById(id); |
var valeur = sb.value; |
if (valeur == chaine) { |
sb.value = ''; |
} |
if (valeur == '') { |
sb.value = chaine; |
} |
} |
//]]> |
</script> |
</form> |