Add a test to enable field only when module salary is used
This commit is contained in:
parent
067af47955
commit
47c41f6a85
@ -982,10 +982,13 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Accountancy code
|
// Accountancy code
|
||||||
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
if ($conf->salaries->enabled)
|
||||||
print '<td>';
|
{
|
||||||
print '<input size="30" type="text" name="accountancy_code" value="'.GETPOST('accountancy_code').'">';
|
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||||
print '</td></tr>';
|
print '<td>';
|
||||||
|
print '<input size="30" type="text" name="accountancy_code" value="'.GETPOST('accountancy_code').'">';
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// User color
|
// User color
|
||||||
if (! empty($conf->agenda->enabled))
|
if (! empty($conf->agenda->enabled))
|
||||||
@ -1325,8 +1328,11 @@ else
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Accountancy code
|
// Accountancy code
|
||||||
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
if ($conf->salaries->enabled)
|
||||||
print '<td colspan="2">'.$object->accountancy_code.'</td>';
|
{
|
||||||
|
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||||
|
print '<td colspan="2">'.$object->accountancy_code.'</td>';
|
||||||
|
}
|
||||||
|
|
||||||
// Color user
|
// Color user
|
||||||
if (! empty($conf->agenda->enabled))
|
if (! empty($conf->agenda->enabled))
|
||||||
@ -2023,20 +2029,23 @@ else
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Accountancy code
|
// Accountancy code
|
||||||
print "<tr>";
|
if ($conf->salaries->enabled)
|
||||||
print '<td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
{
|
||||||
print '<td>';
|
print "<tr>";
|
||||||
if ($caneditfield)
|
print '<td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||||
{
|
print '<td>';
|
||||||
print '<input size="30" type="text" class="flat" name="accountancy_code" value="'.$object->accountancy_code.'">';
|
if ($caneditfield)
|
||||||
}
|
{
|
||||||
else
|
print '<input size="30" type="text" class="flat" name="accountancy_code" value="'.$object->accountancy_code.'">';
|
||||||
{
|
}
|
||||||
print '<input type="hidden" name="accountancy_code" value="'.$object->accountancy_code.'">';
|
else
|
||||||
print $object->accountancy_code;
|
{
|
||||||
}
|
print '<input type="hidden" name="accountancy_code" value="'.$object->accountancy_code.'">';
|
||||||
print '</td>';
|
print $object->accountancy_code;
|
||||||
print "</tr>";
|
}
|
||||||
|
print '</td>';
|
||||||
|
print "</tr>";
|
||||||
|
}
|
||||||
|
|
||||||
// User color
|
// User color
|
||||||
if (! empty($conf->agenda->enabled))
|
if (! empty($conf->agenda->enabled))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user