- LSform : Ajout de LStips sur les boutons d'ajout et de suppression de champs

This commit is contained in:
Benjamin Renard 2008-11-14 17:37:37 +00:00
parent f21dfeed08
commit 854ac3d867
2 changed files with 11 additions and 0 deletions

View file

@ -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<input type='hidden' name='validate' value='LSform'/>\n

View file

@ -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');
}
},