Skip to content

Commit

Permalink
FIX Missing token and style
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 27, 2018
1 parent def7322 commit 0f76279
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 16 deletions.
4 changes: 2 additions & 2 deletions htdocs/compta/facture/tpl/linkedobjectblock.tpl.php
Expand Up @@ -47,8 +47,8 @@
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
?>
<tr class="<?php echo $trclass; ?>" data-element="<?php echo $objectlink->element; ?>" data-id="<?php echo $objectlink->id; ?>" >
<td class="linkedcol-element" ><?php echo $langs->trans("CustomerInvoice"); ?></td>
<td class="linkedcol-name" ><?php echo $objectlink->getNomUrl(1); ?></td>
<td class="linkedcol-element"><?php echo $langs->trans("CustomerInvoice"); ?></td>
<td class="linkedcol-name"><?php echo $objectlink->getNomUrl(1); ?></td>
<td class="linkedcol-ref" align="center"><?php echo $objectlink->ref_client; ?></td>
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date,'day'); ?></td>
<td class="linkedcol-amount" align="right"><?php
Expand Down
32 changes: 21 additions & 11 deletions htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php
Expand Up @@ -47,24 +47,34 @@
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
?>
<tr class="<?php echo $trclass; ?>" >
<td><?php echo $langs->trans("RepeatableInvoice"); ?></td>
<td><?php echo $objectlink->getNomUrl(1); ?></td>
<td align="center"></td>
<td align="center"><?php echo dol_print_date($objectlink->date_when,'day'); ?></td>
<td align="right"><?php
<td class="linkedcol-element"><?php echo $langs->trans("RepeatableInvoice"); ?></td>
<td class="linkedcol-name"><?php echo $objectlink->getNomUrl(1); ?></td>
<td class="linkedcol-ref" align="center"></td>
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date_when,'day'); ?></td>
<td class="linkedcol-amount" align="right"><?php
if ($user->rights->facture->lire) {
$total = $total + $objectlink->total_ht;
echo price($objectlink->total_ht);
} ?></td>
<td align="right">
<?php
print $objectlink->getLibStatut(3);
?>
</td>
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
<td class="linkedcol-statut" align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
<td class="linkedcol-action" align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
</tr>
<?php
}
if (count($linkedObjectBlock) > 1)
{
?>
<tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter)?'liste_sub_total':''); ?>">
<td><?php echo $langs->trans("Total"); ?></td>
<td></td>
<td align="center"></td>
<td align="center"></td>
<td align="right"><?php echo price($total); ?></td>
<td align="right"></td>
<td align="right"></td>
</tr>
<?php
}
?>

<!-- END PHP TEMPLATE -->
9 changes: 6 additions & 3 deletions htdocs/core/class/html.form.class.php
Expand Up @@ -6257,7 +6257,7 @@ function showLinkedObjectBlock($object, $morehtmlright='',$compatibleImportEleme
$hookmanager->initHooks(array('commonobject'));
$parameters=array(
'morehtmlright' => $morehtmlright,
'compatibleImportElementsList' =>& $compatibleImportElementsList,
'compatibleImportElementsList' => &$compatibleImportElementsList,
);
$reshook=$hookmanager->executeHooks('showLinkedObjectBlock',$parameters,$object,$action); // Note that $action and $object may have been modified by hook

Expand Down Expand Up @@ -6434,6 +6434,7 @@ function showLinkToObjectBlock($object, $restrictlinksto=array(), $excludelinkst
$hookmanager->initHooks(array('commonobject'));
$parameters=array('listofidcompanytoscan' => $listofidcompanytoscan);
$reshook=$hookmanager->executeHooks('showLinkToObjectBlock',$parameters,$object,$action); // Note that $action and $object may have been modified by hook

if (empty($reshook))
{
if (is_array($hookmanager->resArray) && count($hookmanager->resArray))
Expand Down Expand Up @@ -6466,9 +6467,11 @@ function showLinkToObjectBlock($object, $restrictlinksto=array(), $excludelinkst
$num = $this->db->num_rows($resqllist);
$i = 0;

print '<br><form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="formlinked'.$key.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<br>';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="formlinked'.$key.'">';
print '<input type="hidden" name="action" value="addlink">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="addlink" value="'.$key.'">';
print '<table class="noborder">';
print '<tr class="liste_titre">';
Expand Down

0 comments on commit 0f76279

Please sign in to comment.