Fix: Creation of a task
This commit is contained in:
parent
48f100c068
commit
b305ab4bdb
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -21,20 +21,19 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/projet/index.php
|
* \file htdocs/projet/index.php
|
||||||
* \ingroup projet
|
* \ingroup projet
|
||||||
* \brief Page d'accueil du module projet
|
* \brief Main project home page
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
|
|
||||||
if (!$user->rights->projet->lire) accessforbidden();
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$socid = $user->societe_id;
|
$socid = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
if (!$user->rights->projet->lire) accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -118,7 +117,7 @@ print '</td><td width="70%" valign="top" class="notopnoleft">';
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Company"),"index.php","s.nom","","","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("ThirdParties"),"index.php","s.nom","","","",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("NbOfProjects"),"","","","",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("NbOfProjects"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -152,7 +151,7 @@ if ( $resql )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $langs->trans("Public");
|
print $langs->trans("OthersNotLinkedToThirdParty");
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><a href="'.DOL_URL_ROOT.'/projet/liste.php?socid='.$obj->socid.'">'.$obj->nb.'</a></td>';
|
print '<td align="right"><a href="'.DOL_URL_ROOT.'/projet/liste.php?socid='.$obj->socid.'">'.$obj->nb.'</a></td>';
|
||||||
|
|||||||
@ -57,6 +57,12 @@ if ($_POST["action"] == 'createtask' && $user->rights->projet->creer)
|
|||||||
$_GET["action"]='create';
|
$_GET["action"]='create';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
else if (empty($_POST['task_parent']))
|
||||||
|
{
|
||||||
|
$mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("ChildOfTask"));
|
||||||
|
$_GET["action"]='create';
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
@ -139,12 +145,12 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer && (empty($proje
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td>';
|
||||||
print '<input type="text" size="25" name="label" class="flat" value="'.$_POST["label"].'">';
|
print '<input type="text" size="25" name="label" class="flat" value="'.$_POST["label"].'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("ChildOfTask").'</td><td>';
|
||||||
print $formother->selectProjectTasks('',$projectid, 'task_parent', 0, 0, 1);
|
print $formother->selectProjectTasks('',$projectid, 'task_parent', 0, 0, 1, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("AffectedTo").'</td><td>';
|
print '<tr><td>'.$langs->trans("AffectedTo").'</td><td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user