Add on/off button
This commit is contained in:
parent
9536a59dff
commit
fd033a34e1
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -109,8 +109,8 @@ print "<tr class=\"liste_titre\">\n";
|
|||||||
print ' <td>'.$langs->trans("Name").'</td>';
|
print ' <td>'.$langs->trans("Name").'</td>';
|
||||||
print ' <td>'.$langs->trans("Description").'</td>';
|
print ' <td>'.$langs->trans("Description").'</td>';
|
||||||
print ' <td>'.$langs->trans("Example").'</td>';
|
print ' <td>'.$langs->trans("Example").'</td>';
|
||||||
print ' <td align="center">'.$langs->trans("Activated").'</td>';
|
print ' <td align="center">'.$langs->trans("Status").'</td>';
|
||||||
print ' <td align="center" width="20">'.$langs->trans("Infos").'</td>';
|
print ' <td align="center" width="30">'.$langs->trans("Infos").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
@ -145,12 +145,14 @@ if ($handle)
|
|||||||
if ($conf->global->SOCIETE_CODECLIENT_ADDON == "$file")
|
if ($conf->global->SOCIETE_CODECLIENT_ADDON == "$file")
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print img_tick();
|
print img_picto($langs->trans("Activated"),'on');
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center"><a href="societe.php?action=setcodeclient&value='.$file.'">'.$langs->trans("Activate").'</a></td>';
|
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setcodeclient&value='.$file.'">';
|
||||||
|
print img_picto($langs->trans("Disabled"),'off');
|
||||||
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
@ -178,8 +180,8 @@ print '<tr class="liste_titre">';
|
|||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td>'.$langs->trans("Example").'</td>';
|
print '<td>'.$langs->trans("Example").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("Activated").'</td>';
|
print '<td align="center">'.$langs->trans("Status").'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td align="center" width="30"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
@ -209,13 +211,14 @@ if ($handle)
|
|||||||
if ($conf->global->SOCIETE_CODECOMPTA_ADDON == "$file")
|
if ($conf->global->SOCIETE_CODECOMPTA_ADDON == "$file")
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print img_tick();
|
print img_picto($langs->trans("Activated"),'on');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center"><a href="societe.php?action=setcodecompta&value='.$file.'">'.$langs->trans("Activate").'</a></td>';
|
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setcodecompta&value='.$file.'">';
|
||||||
|
print img_picto($langs->trans("Disabled"),'off');
|
||||||
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -234,14 +237,14 @@ $var=true;
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print "<td>".$langs->trans("Parameters")."</td>\n";
|
print "<td>".$langs->trans("Parameters")."</td>\n";
|
||||||
print " <td align=\"right\" width=\"60\">".$langs->trans("Value")."</td>\n";
|
print '<td align="right" width="60">'.$langs->trans("Value").'</td>'."\n";
|
||||||
print " <td width=\"80\"> </td></tr>\n";
|
print '<td width="80"> </td></tr>'."\n";
|
||||||
|
|
||||||
// Utilisation formulaire Ajax sur choix societe
|
// Utilisation formulaire Ajax sur choix societe
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<form method=\"post\" action=\"societe.php\">";
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"usesearchtoselectcompany\">";
|
print '<input type="hidden" name="action" value="usesearchtoselectcompany">';
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td width="80%">'.$langs->trans("UseSearchToSelectCompany").'</td>';
|
print '<td width="80%">'.$langs->trans("UseSearchToSelectCompany").'</td>';
|
||||||
if (! $conf->use_javascript_ajax)
|
if (! $conf->use_javascript_ajax)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user