Code comment

This commit is contained in:
Laurent Destailleur 2018-11-11 14:36:35 +01:00
parent ad7ae76cd3
commit de259e9db6
2 changed files with 20 additions and 17 deletions

View File

@ -142,6 +142,9 @@ print '<tr class="oddeven"><td>'.$langs->trans("SessionName").'</td><td colspan=
print '<tr class="oddeven"><td>'.$langs->trans("SessionId").'</td><td colspan="2">'.session_id().'</td></tr>'."\n";
print '<tr class="oddeven"><td>'.$langs->trans("CurrentSessionTimeOut").'</td><td>'.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds");
print '</td><td align="right">';
print '<!-- session.gc_maxlifetime = '.ini_get("session.gc_maxlifetime").' -->'."\n";
print '<!-- session.gc_probability = '.ini_get("session.gc_probability").' -->'."\n";
print '<!-- session.gc_divisor = '.ini_get("session.gc_divisor").' -->'."\n";
print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor")));
print "</td></tr>\n";
print '<tr class="oddeven"><td>'.$langs->trans("CurrentTheme").'</td><td colspan="2">'.$conf->theme.'</td></tr>'."\n";

View File

@ -252,19 +252,19 @@ if ($action == 'add')
}
}
$object->fk_project = isset($_POST["projectid"])?$_POST["projectid"]:0;
$taskid = GETPOST('taskid','int');
if(!empty($taskid)){
$taskProject = new Task($db);
if($taskProject->fetch($taskid)>0){
$object->fk_project = $taskProject->fk_project;
}
$object->fk_element = $taskid;
$object->elementtype = 'task';
}
$object->datep = $datep;
$object->datef = $datef;
$object->percentage = $percentage;
@ -888,17 +888,17 @@ if ($action == 'create')
{
// Projet associe
$langs->load("projects");
$projectid = GETPOST('projectid', 'int');
print '<tr><td class="titlefieldcreate">'.$langs->trans("Project").'</td><td id="project-input-container" >';
$numproject=$formproject->select_projects((! empty($societe->id)?$societe->id:-1), $projectid, 'projectid', 0, 0, 1, 1);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create">'.$langs->trans("AddProject").'</a>';
$urloption='?action=create';
$url = dol_buildpath('comm/action/card.php',2).$urloption;
// update task list
print "\n".'<script type="text/javascript">';
print '$(document).ready(function () {
@ -911,11 +911,11 @@ if ($action == 'create')
});
})';
print '</script>'."\n";
print '</td></tr>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("Task").'</td><td id="project-task-input-container" >';
$projectsListId=false;
if(!empty($projectid)){ $projectsListId=$projectid; }
$tid=GETPOST("projecttaskid")?GETPOST("projecttaskid"):'';
@ -1230,7 +1230,7 @@ if ($id > 0)
$listofuserid=json_decode($_SESSION['assignedtouser'], true);
}
}
$listofcontactid=$object->socpeopleassigned; // Contact assigned (not used yet)
$listofcontactid=$object->socpeopleassigned; // Contact assigned
$listofotherid=$object->otherassigned; // Other undefined email (not used yet)
print '<tr><td class="tdtop nowrap fieldrequired">'.$langs->trans("ActionAssignedTo").'</td><td colspan="3">';
@ -1309,14 +1309,14 @@ if ($id > 0)
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
print '<tr>';
print '<td>'.$langs->trans("LinkedObject").'</td>';
if ($object->elementtype == 'task' && ! empty($conf->projet->enabled))
{
print '<td id="project-task-input-container" >';
$urloption='?action=create'; // we use create not edit for more flexibility
$url = DOL_URL_ROOT.'/comm/action/card.php'.$urloption;
// update task list
print "\n".'<script type="text/javascript" >';
print '$(document).ready(function () {
@ -1329,10 +1329,10 @@ if ($id > 0)
});
})';
print '</script>'."\n";
$formproject->selectTasks((! empty($societe->id)?$societe->id:-1), $object->fk_element, 'fk_element', 24, 0, 0, 1, 0, 0, 'maxwidth500',$object->fk_project);
print '<input type="hidden" name="elementtype" value="'.$object->elementtype.'">';
print '</td>';
}
else
@ -1343,7 +1343,7 @@ if ($id > 0)
print '<input type="hidden" name="elementtype" value="'.$object->elementtype.'">';
print '</td>';
}
print '</tr>';
}