From 854ac3d867a2a69e65021713854ffef5b8af8767 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 14 Nov 2008 17:37:37 +0000 Subject: [PATCH] - LSform : Ajout de LStips sur les boutons d'ajout et de suppression de champs --- trunk/includes/class/class.LSform.php | 9 +++++++++ trunk/includes/js/LSformElement_field.js | 2 ++ 2 files changed, 11 insertions(+) diff --git a/trunk/includes/class/class.LSform.php b/trunk/includes/class/class.LSform.php index c33e7d0f..92881d3d 100644 --- a/trunk/includes/class/class.LSform.php +++ b/trunk/includes/class/class.LSform.php @@ -81,6 +81,15 @@ class LSform { $GLOBALS['LSsession'] -> addJSscript('LSformElement.js'); $GLOBALS['LSsession'] -> addJSscript('LSform.js'); } + + $GLOBALS['LSsession'] -> addHelpInfos( + 'LSform', + array( + 'addFieldBtn' => _('Ajouter un champ pour saisir une autre valeur.'), + 'removeFieldBtn' => _('Supprimer ce champ.') + ) + ); + $GLOBALS['LSsession'] -> addCssFile('LSform.css'); $GLOBALS['Smarty'] -> assign('LSform_action',$_SERVER['PHP_SELF']); $LSform_header = "\t\n diff --git a/trunk/includes/js/LSformElement_field.js b/trunk/includes/js/LSformElement_field.js index 30b3858d..82f01df9 100644 --- a/trunk/includes/js/LSformElement_field.js +++ b/trunk/includes/js/LSformElement_field.js @@ -10,12 +10,14 @@ var LSformElement_field = new Class({ this.addFieldBtn.addClass('btn'); this.addFieldBtn.addEvent('click',this.LSformElement.onAddFieldBtnClick.bind(this.LSformElement,this)); this.addFieldBtn.injectInside(this.li); + varLSdefault.addHelpInfo(this.addFieldBtn,'LSform','addFieldBtn'); this.removeFieldBtn = new Element('img'); this.removeFieldBtn.src = varLSdefault.imagePath('remove.png'); this.removeFieldBtn.addClass('btn'); this.removeFieldBtn.addEvent('click',this.LSformElement.onRemoveFieldBtnClick.bind(this.LSformElement,this)); this.removeFieldBtn.injectInside(this.li); + varLSdefault.addHelpInfo(this.removeFieldBtn,'LSform','removeFieldBtn'); } },