Fix: W3C. No form into TR.

This commit is contained in:
Laurent Destailleur 2013-07-31 11:41:25 +02:00
parent 378842e05f
commit 384e3812eb

View File

@ -1086,18 +1086,26 @@ else
$productstatic=new Product($db); $productstatic=new Product($db);
// Title line for service // Title line for service
print '<table class="notopnoleft allwidth">'; // Array with (n*2)+1 lines //print '<table class="notopnoleft allwidth">'; // Array with (n*2)+1 lines
$cursorline=1; $cursorline=1;
while ($cursorline <= $nbofservices) while ($cursorline <= $nbofservices)
{ {
print '<tr height="16" '.$bc[false].'>'; //print '<tr '.$bc[false].'>';
print '<td class="liste_titre" width="90" style="border-left: 1px solid #'.$colorb.'; border-top: 1px solid #'.$colorb.'; border-bottom: 1px solid #'.$colorb.';">'; //print '<td width="90" style="border-left: 1px solid #'.$colorb.'; border-top: 1px solid #'.$colorb.'; border-bottom: 1px solid #'.$colorb.';">';
print $langs->trans("ServiceNb",$cursorline).'</td>'; //print $langs->trans("ServiceNb",$cursorline).'</td>';
print '<td class="tab" style="border-right: 1px solid #'.$colorb.'; border-top: 1px solid #'.$colorb.'; border-bottom: 1px solid #'.$colorb.';" rowspan="2">'; // print '<td class="tab" style="border-right: 1px solid #'.$colorb.'; border-top: 1px solid #'.$colorb.'; border-bottom: 1px solid #'.$colorb.';" rowspan="2">';
print '<form name="update" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="updateligne">';
print '<input type="hidden" name="elrowid" value="'.GETPOST('rowid').'">';
print '<input type="hidden" name="idprod" value="'.($objp->fk_product?$objp->fk_product:'0').'">';
print '<input type="hidden" name="fournprice" value="'.($objp->fk_fournprice?$objp->fk_fournprice:'0').'">';
// Area with common detail of line // Area with common detail of line
print '<table class="notopnoleft" width="100%">'; print '<table class="notopnoleft allwidth" width="100%">';
$sql = "SELECT cd.rowid, cd.statut, cd.label as label_det, cd.fk_product, cd.description, cd.price_ht, cd.qty,"; $sql = "SELECT cd.rowid, cd.statut, cd.label as label_det, cd.fk_product, cd.description, cd.price_ht, cd.qty,";
$sql.= " cd.tva_tx, cd.remise_percent, cd.info_bits, cd.subprice,"; $sql.= " cd.tva_tx, cd.remise_percent, cd.info_bits, cd.subprice,";
@ -1115,7 +1123,7 @@ else
$total = 0; $total = 0;
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Service").'</td>'; print '<td>'.$langs->trans("ServiceNb",$cursorline).'</td>';
print '<td width="50" align="center">'.$langs->trans("VAT").'</td>'; print '<td width="50" align="center">'.$langs->trans("VAT").'</td>';
print '<td width="50" align="right">'.$langs->trans("PriceUHT").'</td>'; print '<td width="50" align="right">'.$langs->trans("PriceUHT").'</td>';
print '<td width="30" align="center">'.$langs->trans("Qty").'</td>'; print '<td width="30" align="center">'.$langs->trans("Qty").'</td>';
@ -1230,13 +1238,7 @@ else
} }
// Ligne en mode update // Ligne en mode update
else else
{ {
print '<form name="update" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="updateligne">';
print '<input type="hidden" name="elrowid" value="'.GETPOST('rowid').'">';
print '<input type="hidden" name="idprod" value="'.($objp->fk_product?$objp->fk_product:'0').'">';
print '<input type="hidden" name="fournprice" value="'.($objp->fk_fournprice?$objp->fk_fournprice:'0').'">';
// Ligne carac // Ligne carac
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print '<td>'; print '<td>';
@ -1287,14 +1289,12 @@ else
$form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); $form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update");
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
print "</form>\n";
} }
$db->free($result); $db->free($result);
} }
else else
{ {
dol_print_error($db); dol_print_error($db);
} }
@ -1306,6 +1306,7 @@ else
} }
print "</table>"; print "</table>";
print "</form>\n";
/* /*
@ -1515,13 +1516,14 @@ else
print '</form>'; print '</form>';
} }
print '</td>'; // End td if line is 1 /* print '</td>'; // End td if line is 1
print '</tr>'; print '</tr>';
print '<tr><td style="border-right: 1px solid #'.$colorb.'">&nbsp;</td></tr>'; print '<tr><td style="border-right: 1px solid #'.$colorb.'">&nbsp;</td></tr>';*/
$cursorline++; $cursorline++;
} }
print '</table>'; //print '</table>';
// Form to add new line // Form to add new line
if ($user->rights->contrat->creer && ($object->statut >= 0)) if ($user->rights->contrat->creer && ($object->statut >= 0))