Debug v13
This commit is contained in:
parent
cfa194436f
commit
206caec290
@ -608,9 +608,10 @@ class FormProjets
|
||||
* @param int $showpercent Show default probability for status
|
||||
* @param string $morecss Add more css
|
||||
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||
* @param int $addcombojs 1=Add a js combo
|
||||
* @return int|string The HTML select list of element or '' if nothing or -1 if KO
|
||||
*/
|
||||
public function selectOpportunityStatus($htmlname, $preselected = '-1', $showempty = 1, $useshortlabel = 0, $showallnone = 0, $showpercent = 0, $morecss = '', $noadmininfo = 0)
|
||||
public function selectOpportunityStatus($htmlname, $preselected = '-1', $showempty = 1, $useshortlabel = 0, $showallnone = 0, $showpercent = 0, $morecss = '', $noadmininfo = 0, $addcombojs = 0)
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
|
||||
@ -656,7 +657,10 @@ class FormProjets
|
||||
$i++;
|
||||
}
|
||||
$sellist .= '</select>';
|
||||
|
||||
if ($user->admin && !$noadmininfo) $sellist .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
|
||||
if ($addcombojs) $sellist .= ajax_combobox($htmlname);
|
||||
}
|
||||
/*else
|
||||
{
|
||||
|
||||
@ -97,7 +97,7 @@ class Mo extends CommonObject
|
||||
'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1),
|
||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'showoncombobox'=>'1', 'noteditable'=>1),
|
||||
'fk_bom' => array('type'=>'integer:Bom:bom/class/bom.class.php:0:t.status=1', 'filter'=>'active=1', 'label'=>'BOM', 'enabled'=>1, 'visible'=>1, 'position'=>33, 'notnull'=>-1, 'index'=>1, 'comment'=>"Original BOM", 'css'=>'maxwidth300'),
|
||||
'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:0', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'comment'=>"Product to produce", 'css'=>'maxwidth300'),
|
||||
'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:0', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'comment'=>"Product to produce", 'css'=>'maxwidth300', 'picto'=>'product'),
|
||||
'qty' => array('type'=>'real', 'label'=>'QtyToProduce', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'notnull'=>1, 'comment'=>"Qty to produce", 'css'=>'width75', 'default'=>1, 'isameasure'=>1),
|
||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>42, 'notnull'=>-1, 'searchall'=>1, 'showoncombobox'=>'1',),
|
||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1', 'label'=>'ThirdParty', 'picto'=>'company', 'enabled'=>1, 'visible'=>-1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'css'=>'maxwidth400'),
|
||||
|
||||
@ -465,8 +465,7 @@ llxHeader("", $title, $help_url);
|
||||
|
||||
$titleboth = $langs->trans("LeadsOrProjects");
|
||||
$titlenew = $langs->trans("NewLeadOrProject"); // Leads and opportunities by default
|
||||
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 0)
|
||||
{
|
||||
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 0) {
|
||||
$titleboth = $langs->trans("Projects");
|
||||
$titlenew = $langs->trans("NewProject");
|
||||
}
|
||||
@ -536,11 +535,10 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<label for="usage_opportunity">'.$form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext).'</label>';
|
||||
print '<script>';
|
||||
print '$( document ).ready(function() {
|
||||
jQuery("#usage_opportunity").change(function() {
|
||||
@ -560,14 +558,14 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
{
|
||||
print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<label for="usage_task">'.$form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext).'</label>';
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||
{
|
||||
print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '').'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<label for="usage_bill_time">'.$form->textwithpicto($langs->trans("BillTime"), $htmltext).'</label>';
|
||||
print '<br>';
|
||||
}
|
||||
/*
|
||||
@ -611,7 +609,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
$array = array();
|
||||
if (empty($conf->global->PROJECT_DISABLE_PRIVATE_PROJECT)) $array[0] = $langs->trans("PrivateProject");
|
||||
if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) $array[1] = $langs->trans("SharedProject");
|
||||
print $form->selectarray('public', $array, GETPOST('public') ?GETPOST('public') : $object->public);
|
||||
print $form->selectarray('public', $array, GETPOST('public') ?GETPOST('public') : $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Date start
|
||||
@ -629,7 +627,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
// Opportunity status
|
||||
print '<tr class="classuseopportunity"><td>'.$langs->trans("OpportunityStatus").'</td>';
|
||||
print '<td class="maxwidthonsmartphone">';
|
||||
print $formproject->selectOpportunityStatus('opp_status', GETPOST('opp_status') ?GETPOST('opp_status') : $object->opp_status);
|
||||
print $formproject->selectOpportunityStatus('opp_status', GETPOST('opp_status') ?GETPOST('opp_status') : $object->opp_status, 1, 0, 0, 0, '', 0, 1);
|
||||
print '</tr>';
|
||||
|
||||
// Opportunity probability
|
||||
@ -882,7 +880,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
$array = array();
|
||||
if (empty($conf->global->PROJECT_DISABLE_PRIVATE_PROJECT)) $array[0] = $langs->trans("PrivateProject");
|
||||
if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) $array[1] = $langs->trans("SharedProject");
|
||||
print $form->selectarray('public', $array, $object->public);
|
||||
print $form->selectarray('public', $array, $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
@ -891,7 +889,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
// Opportunity status
|
||||
print '<tr class="classuseopportunity'.$classfortr.'"><td>'.$langs->trans("OpportunityStatus").'</td>';
|
||||
print '<td>';
|
||||
print $formproject->selectOpportunityStatus('opp_status', $object->opp_status, 1, 0, 0, 0, 'inline-block valignmiddle');
|
||||
print $formproject->selectOpportunityStatus('opp_status', $object->opp_status, 1, 0, 0, 0, 'inline-block valignmiddle', 0, 1);
|
||||
print '<div id="divtocloseproject" class="inline-block valign" style="display: none;"> ';
|
||||
print '<input type="checkbox" id="inputcloseproject" name="closeproject" /> ';
|
||||
print $langs->trans("AlsoCloseAProject");
|
||||
|
||||
@ -106,7 +106,7 @@ $morehtml .= '<SELECT name="search_project_user">';
|
||||
$morehtml .= '<option name="all" value="0"'.($mine ? '' : ' selected').'>'.$titleall.'</option>';
|
||||
$morehtml .= '<option name="mine" value="'.$user->id.'"'.(($search_project_user == $user->id) ? ' selected' : '').'>'.$langs->trans("ProjectsImContactFor").'</option>';
|
||||
$morehtml .= '</SELECT>';
|
||||
$morehtml .= '<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'">';
|
||||
$morehtml .= '<input type="submit" class="button smallpaddingimp" name="refresh" value="'.$langs->trans("Refresh").'">';
|
||||
$morehtml .= '</form>';
|
||||
|
||||
if ($mine) $tooltiphelp = $langs->trans("MyProjectsDesc");
|
||||
|
||||
@ -329,6 +329,7 @@ $userstatic = new User($db);
|
||||
$title = $langs->trans("Project").' - '.$langs->trans("Tasks").' - '.$object->ref.' '.$object->name;
|
||||
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.' '.$object->name.' - '.$langs->trans("Tasks");
|
||||
$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
||||
|
||||
llxHeader("", $title, $help_url);
|
||||
|
||||
|
||||
@ -531,11 +532,11 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
||||
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">'.$langs->trans("Ref").'</span></td><td>';
|
||||
if (empty($duplicate_code_error))
|
||||
{
|
||||
print (GETPOSTISSET("ref") ?GETPOST("ref", 'alpha') : $defaultref);
|
||||
print (GETPOSTISSET("ref") ? GETPOST("ref", 'alpha') : $defaultref);
|
||||
} else {
|
||||
print $defaultref;
|
||||
}
|
||||
print '<input type="hidden" name="taskref" value="'.($_POST["ref"] ? $_POST["ref"] : $defaultref).'">';
|
||||
print '<input type="hidden" name="taskref" value="'.(GETPOSTISSET("ref") ? GETPOST("ref", 'alpha') : $defaultref).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td>';
|
||||
@ -544,7 +545,8 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
||||
|
||||
// List of projects
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("ChildOfProjectTask").'</td><td>';
|
||||
print $formother->selectProjectTasks(GETPOST('task_parent'), $projectid ? $projectid : $object->id, 'task_parent', 0, 0, 1, 1, 0, '0,1', 'maxwidth500');
|
||||
print img_picto('', 'project');
|
||||
$formother->selectProjectTasks(GETPOST('task_parent'), $projectid ? $projectid : $object->id, 'task_parent', 0, 0, 1, 1, 0, '0,1', 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("AffectedTo").'</td><td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user