Fix: Balise td en trop. Bouton action à masquer quand sur formulaire de cloture.
This commit is contained in:
parent
b8525ba82c
commit
db4d54aa9d
@ -147,7 +147,7 @@ if ($_POST['action'] == 'add')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET['action'] == 'pdf')
|
if ($_GET['action'] == 'builddoc')
|
||||||
{
|
{
|
||||||
$propal = new Propal($db);
|
$propal = new Propal($db);
|
||||||
$propal->fetch($_GET['propalid']);
|
$propal->fetch($_GET['propalid']);
|
||||||
@ -159,9 +159,12 @@ if ($_GET['action'] == 'pdf')
|
|||||||
*/
|
*/
|
||||||
if ($_POST['action'] == 'setstatut' && $user->rights->propale->cloturer)
|
if ($_POST['action'] == 'setstatut' && $user->rights->propale->cloturer)
|
||||||
{
|
{
|
||||||
|
if (! $_POST['cancel'])
|
||||||
|
{
|
||||||
$propal = new Propal($db);
|
$propal = new Propal($db);
|
||||||
$propal->fetch($_GET['propalid']);
|
$propal->fetch($_GET['propalid']);
|
||||||
$propal->cloture($user, $_POST['statut'], $_POST['note']);
|
$propal->cloture($user, $_POST['statut'], $_POST['note']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -588,10 +591,8 @@ if ($_GET['propalid'] > 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
if ($conf->projet->enabled)
|
if ($conf->projet->enabled) $rowspan++;
|
||||||
$rowspan++;
|
|
||||||
|
|
||||||
print '<td valign="top" colspan="2" width="50%" rowspan="'.$rowspan.'">'.$langs->trans('Note').' :<br>'. nl2br($propal->note).'</td></tr>';
|
print '<td valign="top" colspan="2" width="50%" rowspan="'.$rowspan.'">'.$langs->trans('Note').' :<br>'. nl2br($propal->note).'</td></tr>';
|
||||||
|
|
||||||
@ -923,7 +924,10 @@ if ($_GET['propalid'] > 0)
|
|||||||
print '<option value="3">'.$propal->labelstatut[3].'</option>';
|
print '<option value="3">'.$propal->labelstatut[3].'</option>';
|
||||||
print '</select>';
|
print '</select>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td align="center" colspan="2"><input type="submit" class="button" value="'.$langs->trans('Validate').'"></td>';
|
print '<tr><td align="center" colspan="2">';
|
||||||
|
print '<input type="submit" class="button" name="validate" value="'.$langs->trans('Validate').'">';
|
||||||
|
print ' <input type="submit" class="button" name="cancel" value="'.$langs->trans('Cancel').'">';
|
||||||
|
print '</td>';
|
||||||
print '</tr></table></form>';
|
print '</tr></table></form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -933,6 +937,9 @@ if ($_GET['propalid'] > 0)
|
|||||||
*/
|
*/
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
|
if ($_GET['action'] != 'statut')
|
||||||
|
{
|
||||||
|
|
||||||
// Valid
|
// Valid
|
||||||
if ($propal->statut == 0)
|
if ($propal->statut == 0)
|
||||||
{
|
{
|
||||||
@ -956,11 +963,11 @@ if ($_GET['propalid'] > 0)
|
|||||||
{
|
{
|
||||||
if ($propal->statut < 2)
|
if ($propal->statut < 2)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="propal.php?propalid='.$propal->id.'&action=pdf">'.$langs->trans("BuildPDF").'</a>';
|
print '<a class="butAction" href="propal.php?propalid='.$propal->id.'&action=builddoc">'.$langs->trans("BuildPDF").'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="propal.php?propalid='.$propal->id.'&action=pdf">'.$langs->trans("RebuildPDF").'</a>';
|
print '<a class="butAction" href="propal.php?propalid='.$propal->id.'&action=builddoc">'.$langs->trans("RebuildPDF").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -996,6 +1003,8 @@ if ($_GET['propalid'] > 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user