From 4709d8deb6aa4199513a0be51a5b9a52c5266d7c Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 30 Jan 2010 11:41:26 +0000 Subject: [PATCH] Add on/off button --- htdocs/admin/commande.php | 32 ++++++++++++++++++-------------- htdocs/admin/propale.php | 32 ++++++++++++++++++-------------- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 9323a95fdca..9fda1dada52 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Andre Cianfarani - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * * This program is free software; you can redistribute it and/or modify @@ -200,7 +200,7 @@ print ''; print ''.$langs->trans("Name").''; print ''.$langs->trans("Description").''; print ''.$langs->trans("Example").''; -print ''.$langs->trans("Activated").''; +print ''.$langs->trans("Status").''; print ''.$langs->trans("Infos").''; print "\n"; @@ -239,11 +239,13 @@ if ($handle) print ''; if ($conf->global->COMMANDE_ADDON == "$file") { - print img_tick($langs->trans("Activated")); + print img_picto($langs->trans("Activated"),'on'); } else { - print ''.$langs->trans("Activate").''; + print ''; + print img_picto($langs->trans("Disabled"),'off'); + print ''; } print ''; @@ -317,7 +319,7 @@ print "\n"; print "\n"; print ' \n"; print " \n"; -print '\n"; +print '\n"; print '\n"; print ''; print "\n"; @@ -344,37 +346,39 @@ while (($file = readdir($handle))!==false) print "\n"; // Activated + print ""; } else { - print ""; + print ''; + print img_picto($langs->trans("Disabled"),'off'); + print ''; } + print ""; // Defaut print "'; diff --git a/htdocs/admin/propale.php b/htdocs/admin/propale.php index 6f5adf4b689..7311ce89bf7 100644 --- a/htdocs/admin/propale.php +++ b/htdocs/admin/propale.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * * This program is free software; you can redistribute it and/or modify @@ -203,7 +203,7 @@ print ''; print '\n"; print '\n"; print '\n"; -print ''; +print ''; print ''; print ''."\n"; @@ -246,11 +246,13 @@ foreach ($conf->file->dol_document_root as $dirroot) print ''; @@ -325,7 +327,7 @@ print "
'.$langs->trans("Name")."".$langs->trans("Description")."'.$langs->trans("Activated")."'.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("Infos").'
\n"; if (in_array($name, $def)) { - print "\n"; if ($conf->global->COMMANDE_ADDON_PDF != "$name") { print ''; - print img_tick($langs->trans("Disable")); + print img_picto($langs->trans("Activated"),'on'); print ''; } else { - print img_tick($langs->trans("Enabled")); + print img_picto($langs->trans("Activated"),'on'); } - print "\n"; - print ''.$langs->trans("Activate").''; - print ""; if ($conf->global->COMMANDE_ADDON_PDF == "$name") { - print img_tick($langs->trans("Default")); + print img_picto($langs->trans("Yes"),'on'); } else { - print ''.$langs->trans("Default").''; + print ''; + print img_picto($langs->trans("No"),'off'); + print ''; } print '
'.$langs->trans("Name")."'.$langs->trans("Description")."'.$langs->trans("Example")."'.$langs->trans("Activated").''.$langs->trans("Status").''.$langs->trans("Infos").'
'; if ($conf->global->PROPALE_ADDON == "$file") { - print img_tick($langs->trans("Activated")); + print img_picto($langs->trans("Activated"),'on'); } else { - print ''.$langs->trans("Activate").''; + print ''; + print img_picto($langs->trans("Disabled"),'off'); + print ''; } print '
\n"; print "\n"; print " \n"; print " \n"; -print '\n"; +print '\n"; print '\n"; print ''; print "\n"; @@ -352,37 +354,39 @@ while (($file = readdir($handle))!==false) print ''; // Activate + print ""; } else { - print ""; + print ''; + print img_picto($langs->trans("Disabled"),'off'); + print ''; } + print ""; // Default print "';
".$langs->trans("Name")."".$langs->trans("Description")."'.$langs->trans("Activated")."'.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("Infos").'
\n"; if (in_array($name, $def)) { - print "\n"; if ($conf->global->PROPALE_ADDON_PDF != "$name") { print ''; - print img_tick($langs->trans("Disable")); + print img_picto($langs->trans("Activated"),'on'); print ''; } else { - print img_tick($langs->trans("Enabled")); + print img_picto($langs->trans("Activated"),'on'); } - print "\n"; - print ''.$langs->trans("Activate").''; - print ""; if ($conf->global->PROPALE_ADDON_PDF == "$name") { - print img_tick($langs->trans("Default")); + print img_picto($langs->trans("Yes"),'on'); } else { - print ''.$langs->trans("Default").''; + print ''; + print img_picto($langs->trans("No"),'off'); + print ''; } print '