Show extrafield separator on thirdparty and contact

This commit is contained in:
jfefe 2013-03-16 00:28:45 +01:00
parent f16c9dd3ac
commit 9a57431879
2 changed files with 91 additions and 51 deletions

View File

@ -521,6 +521,12 @@ else
foreach($extrafields->attribute_label as $key=>$label) foreach($extrafields->attribute_label as $key=>$label)
{ {
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:'')); $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
if ($extrafields->attribute_type[$key] == 'separate')
{
print $extrafields->showSeparator($key);
}
else
{
print '<tr><td'; print '<tr><td';
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"'; if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
print '>'.$label.'</td><td colspan="3">'; print '>'.$label.'</td><td colspan="3">';
@ -528,6 +534,7 @@ else
print '</td></tr>'."\n"; print '</td></tr>'."\n";
} }
} }
}
print "</table><br>"; print "</table><br>";
@ -736,6 +743,12 @@ else
foreach($extrafields->attribute_label as $key=>$label) foreach($extrafields->attribute_label as $key=>$label)
{ {
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
if ($extrafields->attribute_type[$key] == 'separate')
{
print $extrafields->showSeparator($key);
}
else
{
print '<tr><td'; print '<tr><td';
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"'; if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
print '>'.$label.'</td><td colspan="3">'; print '>'.$label.'</td><td colspan="3">';
@ -743,6 +756,7 @@ else
print "</td></tr>\n"; print "</td></tr>\n";
} }
} }
}
$object->load_ref_elements(); $object->load_ref_elements();
@ -948,11 +962,18 @@ else
foreach($extrafields->attribute_label as $key=>$label) foreach($extrafields->attribute_label as $key=>$label)
{ {
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:'')); $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:''));
if ($extrafields->attribute_type[$key] == 'separate')
{
print $extrafields->showSeparator($key);
}
else
{
print '<tr><td>'.$label.'</td><td colspan="3">'; print '<tr><td>'.$label.'</td><td colspan="3">';
print $extrafields->showOutputField($key,$value); print $extrafields->showOutputField($key,$value);
print "</td></tr>\n"; print "</td></tr>\n";
} }
} }
}
$object->load_ref_elements(); $object->load_ref_elements();

View File

@ -985,6 +985,12 @@ else
{ {
$colspan='3'; $colspan='3';
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:'')); $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
if ($extrafields->attribute_type[$key] == 'separate')
{
print $extrafields->showSeparator($key);
}
else
{
if (($e % 2) == 0) if (($e % 2) == 0)
{ {
print '<tr>'; print '<tr>';
@ -1001,6 +1007,7 @@ else
$e++; $e++;
} }
} }
}
// Ajout du logo // Ajout du logo
print '<tr>'; print '<tr>';
@ -1414,7 +1421,12 @@ else
{ {
$colspan = '3'; $colspan = '3';
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
if ($extrafields->attribute_type[$key] == 'separate')
{
print $extrafields->showSeparator($key);
}
else
{
if (($e % 2) == 0) if (($e % 2) == 0)
{ {
print '<tr>'."\n"; print '<tr>'."\n";
@ -1431,10 +1443,10 @@ else
{ {
print "</tr>\n"; print "</tr>\n";
} }
$old_pos = $extrafields->attribute_pos[$key];
$e++; $e++;
} }
} }
}
// Logo // Logo
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans("Logo").'</td>'; print '<td>'.$langs->trans("Logo").'</td>';
@ -1753,6 +1765,12 @@ else
{ {
$colspan='3'; $colspan='3';
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:'')); $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:''));
if ($extrafields->attribute_type[$key] == 'separate')
{
print $extrafields->showSeparator($key);
}
else
{
if (($e % 2) == 0) if (($e % 2) == 0)
{ {
print '<tr>'; print '<tr>';
@ -1767,6 +1785,7 @@ else
$e++; $e++;
} }
} }
}
// Ban // Ban
if (empty($conf->global->SOCIETE_DISABLE_BANKACCOUNT)) if (empty($conf->global->SOCIETE_DISABLE_BANKACCOUNT))