Fix: Creation of a task
This commit is contained in:
parent
48f100c068
commit
b305ab4bdb
@ -1,6 +1,6 @@
|
||||
<?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();
|
||||
|
||||
|
||||
/*
|
||||
@ -82,13 +81,13 @@ if ( $resql )
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
|
||||
$projectstatic->id = $objp->projectid;
|
||||
$projectstatic->user_author_id = $objp->fk_user_creat;
|
||||
$projectstatic->public = $objp->public;
|
||||
|
||||
|
||||
$userAccess = $projectstatic->restrictedProjectArea($user,1);
|
||||
|
||||
|
||||
if ($userAccess >= 0)
|
||||
{
|
||||
$var=!$var;
|
||||
@ -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>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user