Skip to content
Snippets Groups Projects
Commit b305ab4b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Creation of a task

parent 48f100c0
No related branches found
No related tags found
No related merge requests found
<?php
/* 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>
*
* This program is free software; you can redistribute it and/or modify
......@@ -21,20 +21,19 @@
/**
* \file htdocs/projet/index.php
* \ingroup projet
* \brief Page d'accueil du module projet
* \brief Main project home page
* \version $Id$
*/
require("./pre.inc.php");
$langs->load("projects");
if (!$user->rights->projet->lire) accessforbidden();
// Security check
if ($user->societe_id > 0)
{
$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 '<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 "</tr>\n";
......@@ -152,7 +151,7 @@ if ( $resql )
}
else
{
print $langs->trans("Public");
print $langs->trans("OthersNotLinkedToThirdParty");
}
print '</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';
$error++;
}
else if (empty($_POST['task_parent']))
{
$mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("ChildOfTask"));
$_GET["action"]='create';
$error++;
}
if (! $error)
{
......@@ -139,12 +145,12 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer && (empty($proje
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 '</td></tr>';
print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>';
print $formother->selectProjectTasks('',$projectid, 'task_parent', 0, 0, 1);
print '<tr><td class="fieldrequired">'.$langs->trans("ChildOfTask").'</td><td>';
print $formother->selectProjectTasks('',$projectid, 'task_parent', 0, 0, 1, 1);
print '</td></tr>';
print '<tr><td>'.$langs->trans("AffectedTo").'</td><td>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment