Merge pull request #751 from jfefe/extrasep
New type of extrafield : separator
This commit is contained in:
commit
2da3fb68a0
@ -1360,11 +1360,20 @@ if ($action == 'create')
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Show separator only
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1854,19 +1863,25 @@ else
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
if ($action == 'edit_extras' && $user->rights->propal->creer)
|
||||
{
|
||||
print $extrafields->showInputField($key,$value);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
}
|
||||
|
||||
print '</td></tr>'."\n";
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
if ($action == 'edit_extras' && $user->rights->propal->creer)
|
||||
{
|
||||
print $extrafields->showInputField($key,$value);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
if(count($extrafields->attribute_label) > 0) {
|
||||
|
||||
@ -2101,11 +2101,19 @@ if ($action == 'create')
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
// Show separator only
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3090,24 +3098,30 @@ else if ($id > 0 || ! empty($ref))
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="5">';
|
||||
if ($action == 'edit_extras' && $user->rights->propal->creer)
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="5">';
|
||||
if ($action == 'edit_extras' && $user->rights->facture->creer)
|
||||
{
|
||||
print $extrafields->showInputField($key,$value);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
|
||||
if(count($extrafields->attribute_label) > 0) {
|
||||
|
||||
if ($action == 'edit_extras' && $user->rights->propal->creer)
|
||||
if ($action == 'edit_extras' && $user->rights->facture->creer)
|
||||
{
|
||||
print '<tr><td></td><td colspan="5">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
@ -3116,7 +3130,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
|
||||
}
|
||||
else {
|
||||
if ($object->statut == 0 && $user->rights->propal->creer)
|
||||
if ($object->statut == 0 && $user->rights->facture->creer)
|
||||
{
|
||||
print '<tr><td></td><td><a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras">'.img_picto('','edit').' '.$langs->trans('Modify').'</a></td></tr>';
|
||||
}
|
||||
|
||||
@ -521,11 +521,18 @@ else
|
||||
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]:''));
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -736,11 +743,18 @@ else
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -948,9 +962,16 @@ else
|
||||
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]:''));
|
||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2138,21 +2138,27 @@ abstract class CommonObject
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."_extrafields (fk_object";
|
||||
foreach($this->array_options as $key => $value)
|
||||
{
|
||||
$attributeKey = substr($key,8); // Remove 'options_' prefix
|
||||
// Add field of attribut
|
||||
$sql.=",".substr($key,8); // Remove 'options_' prefix
|
||||
if ($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate
|
||||
$sql.=",".$attributeKey;
|
||||
}
|
||||
$sql .= ") VALUES (".$this->id;
|
||||
foreach($this->array_options as $key => $value)
|
||||
{
|
||||
$attributeKey = substr($key,8); // Remove 'options_' prefix
|
||||
// Add field o fattribut
|
||||
if ($this->array_options[$key] != '')
|
||||
{
|
||||
$sql.=",'".$this->array_options[$key]."'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.=",null";
|
||||
}
|
||||
if($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate)
|
||||
{
|
||||
if ($this->array_options[$key] != '')
|
||||
{
|
||||
$sql.=",'".$this->array_options[$key]."'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.=",null";
|
||||
}
|
||||
}
|
||||
}
|
||||
$sql.=")";
|
||||
|
||||
|
||||
@ -63,7 +63,8 @@ class ExtraFields
|
||||
'price'=>'ExtrafieldPrice',
|
||||
'phone'=>'ExtrafieldPhone',
|
||||
'mail'=>'ExtrafieldMail',
|
||||
'select' => 'ExtrafieldSelect'
|
||||
'select' => 'ExtrafieldSelect',
|
||||
'separate' => 'ExtrafieldSeparator'
|
||||
);
|
||||
|
||||
/**
|
||||
@ -102,11 +103,13 @@ class ExtraFields
|
||||
if (empty($attrname)) return -1;
|
||||
if (empty($label)) return -1;
|
||||
|
||||
|
||||
// Create field into database
|
||||
$result=$this->create($attrname,$type,$size,$elementtype, $unique, $required, $default_value,$param);
|
||||
// Create field into database except for separator type which is not stored in database
|
||||
if ($type != 'separate')
|
||||
{
|
||||
$result=$this->create($attrname,$type,$size,$elementtype, $unique, $required, $default_value,$param);
|
||||
}
|
||||
$err1=$this->errno;
|
||||
if ($result > 0 || $err1 == 'DB_ERROR_COLUMN_ALREADY_EXISTS')
|
||||
if ($result > 0 || $err1 == 'DB_ERROR_COLUMN_ALREADY_EXISTS' || $type == 'separate')
|
||||
{
|
||||
// Add declaration of field into table
|
||||
$result2=$this->create_label($attrname,$label,$type,$pos,$size,$elementtype, $unique, $required, $param);
|
||||
@ -354,7 +357,6 @@ class ExtraFields
|
||||
function update($attrname,$label,$type,$length,$elementtype,$unique=0,$required=0,$pos,$param='')
|
||||
{
|
||||
$table=$elementtype.'_extrafields';
|
||||
|
||||
// Special case for not normalized table names
|
||||
if ($elementtype == 'member') $table='adherent_extrafields';
|
||||
elseif ($elementtype == 'company') $table='societe_extrafields';
|
||||
@ -382,8 +384,12 @@ class ExtraFields
|
||||
$lengthdb=$length;
|
||||
}
|
||||
$field_desc = array('type'=>$typedb, 'value'=>$lengthdb, 'null'=>($required?'NOT NULL':'NULL'));
|
||||
$result=$this->db->DDLUpdateField(MAIN_DB_PREFIX.$table, $attrname, $field_desc);
|
||||
if ($result > 0)
|
||||
|
||||
if ($type != 'separate') // No table update when separate type
|
||||
{
|
||||
$result=$this->db->DDLUpdateField(MAIN_DB_PREFIX.$table, $attrname, $field_desc);
|
||||
}
|
||||
if ($result > 0 || $type == 'separate')
|
||||
{
|
||||
if ($label)
|
||||
{
|
||||
@ -546,8 +552,13 @@ class ExtraFields
|
||||
{
|
||||
while ($tab = $this->db->fetch_object($resql))
|
||||
{
|
||||
|
||||
// we can add this attribute to adherent object
|
||||
$array_name_label[$tab->name]=$tab->label;
|
||||
if ($tab->type != 'separate')
|
||||
{
|
||||
$array_name_label[$tab->name]=$tab->label;
|
||||
}
|
||||
|
||||
$this->attribute_type[$tab->name]=$tab->type;
|
||||
$this->attribute_label[$tab->name]=$tab->label;
|
||||
$this->attribute_size[$tab->name]=$tab->size;
|
||||
@ -730,5 +741,16 @@ class ExtraFields
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML string to print separator extrafield
|
||||
*
|
||||
* @param string $key Key of attribute
|
||||
* @return string
|
||||
*/
|
||||
function showSeparator($key)
|
||||
{
|
||||
$out = '<tr class="liste_titre"><td colspan="4"><strong>'.$this->attribute_label[$key].'</strong></td></tr>';
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -25,11 +25,18 @@
|
||||
var size = jQuery("#size");
|
||||
var unique = jQuery("#unique");
|
||||
var required = jQuery("#required");
|
||||
var default_value = jQuery("#default_value");
|
||||
<?php
|
||||
if(!GETPOST('type') == "select")
|
||||
if(GETPOST('type') != "select")
|
||||
{
|
||||
print 'jQuery("#value_choice").hide();';
|
||||
}
|
||||
|
||||
if (GETPOST('type') == "separate")
|
||||
{
|
||||
print "jQuery('#size, #unique, #required, #default_value').val('').attr('disabled','disabled');";
|
||||
print 'jQuery("#value_choice").hide();';
|
||||
}
|
||||
?>
|
||||
|
||||
if (type == 'date') { size.val('').attr('disabled','disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide(); }
|
||||
@ -41,6 +48,7 @@
|
||||
else if (type == 'boolean') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").hide();}
|
||||
else if (type == 'price') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").hide();}
|
||||
else if (type == 'select') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();}
|
||||
else if (type == 'separate') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); required.val('').attr('disabled','disabled'); default_value.val('').attr('disabled','disabled'); jQuery("#value_choice").hide();}
|
||||
else size.val('').attr('disabled','disabled');
|
||||
}
|
||||
init_typeoffields('');
|
||||
@ -55,16 +63,16 @@
|
||||
<input type="hidden" name="action" value="add">
|
||||
|
||||
<table summary="listofattributes" class="border centpercent">
|
||||
<!-- Type -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
|
||||
<?php print $form->selectarray('type',$type2label,GETPOST('type')); ?>
|
||||
</td></tr>
|
||||
<!-- Position -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Position"); ?></td><td class="valeur"><input type="text" name="pos" size="5" value="<?php echo GETPOST('pos'); ?>"></td></tr>
|
||||
<!-- Label -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Label"); ?></td><td class="valeur"><input type="text" name="label" size="40" value="<?php echo GETPOST('label'); ?>"></td></tr>
|
||||
<!-- Code -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?> (<?php echo $langs->trans("AlphaNumOnlyCharsAndNoSpace"); ?>)</td><td class="valeur"><input type="text" name="attrname" size="10" value="<?php echo GETPOST('attrname'); ?>"></td></tr>
|
||||
<!-- Type -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
|
||||
<?php print $form->selectarray('type',$type2label,GETPOST('type')); ?>
|
||||
</td></tr>
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?> (<?php echo $langs->trans("AlphaNumOnlyCharsAndNoSpace"); ?>)</td><td class="valeur"><input type="text" name="attrname" id="attrname" size="10" value="<?php echo GETPOST('attrname'); ?>"></td></tr>
|
||||
<!-- Value (for select list / radio) -->
|
||||
<tr id="value_choice">
|
||||
<td>
|
||||
@ -75,7 +83,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Default Value -->
|
||||
<tr><td><?php echo $langs->trans("DefaultValue"); ?></td><td class="valeur"><input id="default_value" type="text" name=""default_value"" size="5" value="<?php echo (GETPOST('"default_value"')?GETPOST('"default_value"'):''); ?>"></td></tr>
|
||||
<tr><td><?php echo $langs->trans("DefaultValue"); ?></td><td class="valeur"><input id="default_value" type="text" name="default_value" size="5" value="<?php echo (GETPOST('"default_value"')?GETPOST('"default_value"'):''); ?>"></td></tr>
|
||||
<!-- Size -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Size"); ?></td><td class="valeur"><input id="size" type="text" name="size" size="5" value="<?php echo (GETPOST('size')?GETPOST('size'):''); ?>"></td></tr>
|
||||
<!-- Unique -->
|
||||
|
||||
@ -354,6 +354,7 @@ ExtrafieldPhone = Téléphone
|
||||
ExtrafieldPrice = Prix
|
||||
ExtrafieldMail = Email
|
||||
ExtrafieldSelect = Liste de sélection
|
||||
ExtrafieldSeparator = Séparateur de champ
|
||||
LibraryToBuildPDF=Bibliothèque utilisée pour la génération des PDF
|
||||
WarningUsingFPDF=Attention: Votre fichier <b>conf.php</b> contient la directive <b>dolibarr_pdf_force_fpdf=1</b>. Cela signifie que vous utilisez la librairie FPDF pour générer vos fichiers PDF. Cette librairie est ancienne et ne couvre pas de nombreuses fonctionnalitée (Unicode, transparence des images, langues cyrillic, arabes ou asiatiques...), aussi vous pouvez rencontrez des problèmes durant la génération des PDF.<br>Pour résoudre cela et avoir un support complet de PDF, vous pouvez télécharger la <a href="http://www.tcpdf.org/" target="_blank">librairie TCPDF</a> puis commenter ou supprimer la ligne <b>$dolibarr_pdf_force_fpdf=1</b>, et ajouter à la place <b>$dolibarr_lib_TCPDF_PATH='chemin_vers_TCPDF'</b>
|
||||
LocalTaxDesc=Certains pays appliquent 2 voir 3 taux sur chaque ligne de facture. Si c'est le cas, choisissez le type du deuxième et troisième taux et sa valeur. Les types possibles sont:<br>1 : taxe locale sur les produits et services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>2 : taxe locale sur les produits et services avant tva (la tva est appliquée sur le montant + la taxe locale)<br>3 : taxe locale uniquement sur les produits hors tva (la tva n'est pas appliquée sur la taxe locale)<br>4 : taxe locale uniquement sur les produits avant tva (la tva est appliquée sur le montant + la taxe locale)<br>5 : taxe locale uniquement sur les services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>6 : taxe locale uniquement sur les service avant tva (la tva est appliquée sur le montant + la taxe locale)
|
||||
|
||||
@ -985,20 +985,27 @@ else
|
||||
{
|
||||
$colspan='3';
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
|
||||
if (($e % 2) == 0)
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print '<tr>';
|
||||
$colspan='0';
|
||||
}
|
||||
print '<td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td>';
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td>';
|
||||
|
||||
if (($e % 2) == 1) print '</tr>'."\n";
|
||||
$e++;
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (($e % 2) == 0)
|
||||
{
|
||||
print '<tr>';
|
||||
$colspan='0';
|
||||
}
|
||||
print '<td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td>';
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td>';
|
||||
|
||||
if (($e % 2) == 1) print '</tr>'."\n";
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1414,25 +1421,30 @@ else
|
||||
{
|
||||
$colspan = '3';
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
|
||||
if (($e % 2) == 0)
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print '<tr>'."\n";
|
||||
$colspan = '0';
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
print '<td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td>'."\n";
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td>"."\n";
|
||||
|
||||
if (($e % 2) == 1 )
|
||||
else
|
||||
{
|
||||
print "</tr>\n";
|
||||
if (($e % 2) == 0)
|
||||
{
|
||||
print '<tr>'."\n";
|
||||
$colspan = '0';
|
||||
}
|
||||
print '<td';
|
||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>'.$label.'</td>'."\n";
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td>"."\n";
|
||||
|
||||
if (($e % 2) == 1 )
|
||||
{
|
||||
print "</tr>\n";
|
||||
}
|
||||
$e++;
|
||||
}
|
||||
$old_pos = $extrafields->attribute_pos[$key];
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
// Logo
|
||||
@ -1753,18 +1765,25 @@ else
|
||||
{
|
||||
$colspan='3';
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:''));
|
||||
if (($e % 2) == 0)
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
{
|
||||
print '<tr>';
|
||||
$colspan='0';
|
||||
print $extrafields->showSeparator($key);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (($e % 2) == 0)
|
||||
{
|
||||
print '<tr>';
|
||||
$colspan='0';
|
||||
}
|
||||
print '<td>'.$label.'</td>';
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print "</td>";
|
||||
|
||||
if (($e % 2) == 1) print '</tr>';
|
||||
$e++;
|
||||
}
|
||||
print '<td>'.$label.'</td>';
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print "</td>";
|
||||
|
||||
if (($e % 2) == 1) print '</tr>';
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user