From fd033a34e196a43fa5d250606686edf09f05a99f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 30 Jan 2010 11:06:59 +0000 Subject: [PATCH] Add on/off button --- htdocs/admin/societe.php | 79 +++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/htdocs/admin/societe.php b/htdocs/admin/societe.php index 7a64b607c51..8cac01bda5b 100644 --- a/htdocs/admin/societe.php +++ b/htdocs/admin/societe.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2009 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -109,8 +109,8 @@ print "\n"; print ' '.$langs->trans("Name").''; print ' '.$langs->trans("Description").''; print ' '.$langs->trans("Example").''; -print ' '.$langs->trans("Activated").''; -print ' '.$langs->trans("Infos").''; +print ' '.$langs->trans("Status").''; +print ' '.$langs->trans("Infos").''; print "\n"; clearstatcache(); @@ -145,12 +145,14 @@ if ($handle) if ($conf->global->SOCIETE_CODECLIENT_ADDON == "$file") { print "\n"; - print img_tick(); + print img_picto($langs->trans("Activated"),'on'); print "\n"; } else { - print ''.$langs->trans("Activate").''; + print ''; + print img_picto($langs->trans("Disabled"),'off'); + print ''; } print ''; @@ -178,8 +180,8 @@ print ''; print ''.$langs->trans("Name").''; print ''.$langs->trans("Description").''; print ''.$langs->trans("Example").''; -print ''.$langs->trans("Activated").''; -print ' '; +print ''.$langs->trans("Status").''; +print ' '; print "\n"; clearstatcache(); @@ -193,32 +195,33 @@ if ($handle) { if (substr($file, 0, 15) == 'mod_codecompta_' && substr($file, -3) == 'php') { - $file = substr($file, 0, strlen($file)-4); - - require_once(DOL_DOCUMENT_ROOT ."/includes/modules/societe/".$file.".php"); - - $modCodeCompta = new $file; - $var = !$var; - - print ''; - print ''.$modCodeCompta->nom."\n"; - print $modCodeCompta->info($langs); - print ''; - print ''.$modCodeCompta->getExample($langs)."\n"; - - if ($conf->global->SOCIETE_CODECOMPTA_ADDON == "$file") - { - print ''; - print img_tick(); - print ''; - } - else - { - print ''.$langs->trans("Activate").''; - - } - print ' '; - print "\n"; + $file = substr($file, 0, strlen($file)-4); + + require_once(DOL_DOCUMENT_ROOT ."/includes/modules/societe/".$file.".php"); + + $modCodeCompta = new $file; + $var = !$var; + + print ''; + print ''.$modCodeCompta->nom."\n"; + print $modCodeCompta->info($langs); + print ''; + print ''.$modCodeCompta->getExample($langs)."\n"; + + if ($conf->global->SOCIETE_CODECOMPTA_ADDON == "$file") + { + print ''; + print img_picto($langs->trans("Activated"),'on'); + print ''; + } + else + { + print ''; + print img_picto($langs->trans("Disabled"),'off'); + print ''; + } + print ' '; + print "\n"; } } closedir($handle); @@ -233,15 +236,15 @@ $html=new Form($db); $var=true; print ''; print ''; -print " \n"; -print " \n"; -print " \n"; +print "\n"; +print ''."\n"; +print ''."\n"; // Utilisation formulaire Ajax sur choix societe $var=!$var; -print ""; +print ''; print ''; -print ""; +print ''; print ""; print ''; if (! $conf->use_javascript_ajax)
".$langs->trans("Parameters")."".$langs->trans("Value")." 
".$langs->trans("Parameters")."'.$langs->trans("Value").' 
'.$langs->trans("UseSearchToSelectCompany").'