mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Fix: form is not allowed inside a table
Conflicts: htdocs/fichinter/fiche.php
This commit is contained in:
@@ -50,6 +50,7 @@ if (! empty($conf->global->FICHEINTER_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
|
|
||||||
|
$langs->load("bills");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
|
|
||||||
@@ -1143,6 +1144,13 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST" name="formfichinter">';
|
||||||
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
if ($action == 'edit_extras') print '<input type="hidden" name="action" value="update_extras">';
|
||||||
|
if ($action == 'contrat') print '<input type="hidden" name="action" value="setcontrat">';
|
||||||
|
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||||
@@ -1218,9 +1226,6 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
if ($action == 'contrat')
|
if ($action == 'contrat')
|
||||||
{
|
{
|
||||||
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
|
||||||
print '<input type="hidden" name="action" value="setcontrat">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$htmlcontract= new Formcontract($db);
|
$htmlcontract= new Formcontract($db);
|
||||||
@@ -1229,7 +1234,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
print '</tr></table></form>';
|
print '</tr></table>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1280,16 +1285,11 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
if ($action == 'edit_extras' && $user->rights->ficheinter->creer && GETPOST('attribute') == $key)
|
if ($action == 'edit_extras' && $user->rights->ficheinter->creer && GETPOST('attribute') == $key)
|
||||||
{
|
{
|
||||||
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formfichinter">';
|
|
||||||
print '<input type="hidden" name="action" value="update_extras">';
|
|
||||||
print '<input type="hidden" name="attribute" value="'.$key.'">';
|
print '<input type="hidden" name="attribute" value="'.$key.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
|
||||||
|
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
print '</form>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1302,6 +1302,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user