Mutualized common code
This commit is contained in:
parent
78ce6c0b1c
commit
8a3fbf9533
@ -802,30 +802,23 @@ else
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Name, firstname
|
// Name, firstname
|
||||||
|
print '<tr><td>';
|
||||||
if ($object->particulier || $private)
|
if ($object->particulier || $private)
|
||||||
{
|
{
|
||||||
print '<tr><td>';
|
|
||||||
print '<label for="name"><span id="TypeName" class="fieldrequired">'.$langs->trans('LastName').'</span></label>';
|
print '<label for="name"><span id="TypeName" class="fieldrequired">'.$langs->trans('LastName').'</span></label>';
|
||||||
print '</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
|
|
||||||
print '<input type="text" size="30" maxlength="60" name="nom" id="name" value="'.$object->name.'"></td>';
|
|
||||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
|
||||||
{
|
|
||||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$object->prefix_comm.'"></td>';
|
|
||||||
}
|
|
||||||
print '</tr>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr><td>';
|
|
||||||
print '<label for="name"><span span id="TypeName" class="fieldrequired">'.$langs->trans('ThirdPartyName').'</span></label>';
|
print '<label for="name"><span span id="TypeName" class="fieldrequired">'.$langs->trans('ThirdPartyName').'</span></label>';
|
||||||
print '</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
|
|
||||||
print '<input type="text" size="30" maxlength="60" name="nom" id="nom" value="'.$object->name.'"></td>';
|
|
||||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field1
|
|
||||||
{
|
|
||||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$object->prefix_comm.'"></td>';
|
|
||||||
}
|
|
||||||
print '</tr>';
|
|
||||||
}
|
}
|
||||||
|
print '</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
|
||||||
|
print '<input type="text" size="30" maxlength="60" name="nom" id="nom" value="'.$object->name.'"></td>';
|
||||||
|
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||||
|
{
|
||||||
|
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$object->prefix_comm.'"></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// If javascript on, we show option individual
|
// If javascript on, we show option individual
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user