Merge branch '13.0' of github.com:Dolibarr/dolibarr into 13.0
This commit is contained in:
commit
3194bea832
Binary file not shown.
@ -5874,8 +5874,14 @@ abstract class CommonObject
|
||||
} elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[2].':'.$reg[3] => 'N');
|
||||
$type = 'link';
|
||||
} elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N');
|
||||
} elseif (preg_match('/^(sellist):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N');
|
||||
$type = 'sellist';
|
||||
} elseif (preg_match('/^(sellist):(.*):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N');
|
||||
$type = 'sellist';
|
||||
} elseif (preg_match('/^(sellist):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[2].':'.$reg[3] => 'N');
|
||||
$type = 'sellist';
|
||||
} elseif (preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) {
|
||||
$param['options'] = array();
|
||||
@ -6042,24 +6048,20 @@ abstract class CommonObject
|
||||
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
|
||||
|
||||
|
||||
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4]))
|
||||
{
|
||||
if (strpos($InfoFieldList[4], 'extra.') !== false)
|
||||
{
|
||||
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
|
||||
if (strpos($InfoFieldList[4], 'extra.') !== false) {
|
||||
$keyList = 'main.'.$InfoFieldList[2].' as rowid';
|
||||
} else {
|
||||
$keyList = $InfoFieldList[2].' as rowid';
|
||||
}
|
||||
}
|
||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3]))
|
||||
{
|
||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
|
||||
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
|
||||
$keyList .= ', '.$parentField;
|
||||
}
|
||||
|
||||
$fields_label = explode('|', $InfoFieldList[1]);
|
||||
if (is_array($fields_label))
|
||||
{
|
||||
if (is_array($fields_label)) {
|
||||
$keyList .= ', ';
|
||||
$keyList .= implode(', ', $fields_label);
|
||||
}
|
||||
@ -6454,13 +6456,18 @@ abstract class CommonObject
|
||||
$param['options'] = array();
|
||||
|
||||
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) $param['options'] = $val['arrayofkeyval'];
|
||||
if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg))
|
||||
{
|
||||
if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$type = 'link';
|
||||
$param['options'] = array($reg[1].':'.$reg[2]=>$reg[1].':'.$reg[2]);
|
||||
} elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N');
|
||||
$type = 'sellist';
|
||||
} elseif (preg_match('/^sellist:(.*):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3] => 'N');
|
||||
$type = 'sellist';
|
||||
} elseif (preg_match('/^sellist:(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[1].':'.$reg[2] => 'N');
|
||||
$type = 'sellist';
|
||||
}
|
||||
|
||||
$langfile = $val['langfile'];
|
||||
@ -6551,8 +6558,7 @@ abstract class CommonObject
|
||||
$selectkey = "rowid";
|
||||
$keyList = 'rowid';
|
||||
|
||||
if (count($InfoFieldList) >= 3)
|
||||
{
|
||||
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
|
||||
$selectkey = $InfoFieldList[2];
|
||||
$keyList = $InfoFieldList[2].' as rowid';
|
||||
}
|
||||
|
||||
@ -6720,7 +6720,7 @@ class Form
|
||||
// Add code for jquery to use multiselect
|
||||
if (!empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))
|
||||
{
|
||||
$out .= "\n".'<!-- JS CODE TO ENABLE select for id '.$htmlname.' -->
|
||||
$out .= "\n".'<!-- JS CODE TO ENABLE select for id '.$htmlname.', addjscombo='.$addjscombo.' -->
|
||||
<script>'."\n";
|
||||
if ($addjscombo == 1)
|
||||
{
|
||||
@ -6751,6 +6751,10 @@ class Form
|
||||
formatSelection: formatSelection,
|
||||
templateSelection: formatSelection /* For 4.0 */
|
||||
});
|
||||
|
||||
/* Add also morecss to the css .select2 that is after the #htmlname, for component that are show dynamically after load, because select2 set
|
||||
the size only if component is not hidden by default on load */
|
||||
$(\'#'.$htmlname.' + .select2\').addClass(\''.$morecss.'\');
|
||||
});'."\n";
|
||||
} elseif ($addjscombo == 2 && !defined('DISABLE_MULTISELECT'))
|
||||
{
|
||||
|
||||
@ -352,7 +352,7 @@ class FormProjets
|
||||
if (empty($option_only) && !empty($conf->use_javascript_ajax))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
||||
$comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus);
|
||||
$comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus);
|
||||
$out .= $comboenhancement;
|
||||
$morecss = 'minwidth200 maxwidth500';
|
||||
}
|
||||
@ -388,7 +388,7 @@ class FormProjets
|
||||
continue;
|
||||
}
|
||||
|
||||
$labeltoshow = '';
|
||||
$labeltoshow = ''; $titletoshow = '';
|
||||
|
||||
$disabled = 0;
|
||||
if ($obj->fk_statut == Project::STATUS_DRAFT)
|
||||
@ -408,32 +408,39 @@ class FormProjets
|
||||
//if ($obj->public) $labeltoshow.=' ('.$langs->trans("SharedProject").')';
|
||||
//else $labeltoshow.=' ('.$langs->trans("Private").')';
|
||||
$labeltoshow .= ' '.dol_trunc($obj->title, $maxlength);
|
||||
$titletoshow = $labeltoshow;
|
||||
|
||||
if ($obj->name) $labeltoshow .= ' ('.$obj->name.')';
|
||||
if ($obj->name) {
|
||||
$labeltoshow .= ' ('.$obj->name.')';
|
||||
$titletoshow .= ' <span class="opacitymedium">('.$obj->name.')</span>';
|
||||
}
|
||||
|
||||
$disabled = 0;
|
||||
if ($obj->fk_statut == Project::STATUS_DRAFT)
|
||||
{
|
||||
if ($obj->fk_statut == Project::STATUS_DRAFT) {
|
||||
$disabled = 1;
|
||||
$labeltoshow .= ' - '.$langs->trans("Draft");
|
||||
} elseif ($obj->fk_statut == Project::STATUS_CLOSED)
|
||||
{
|
||||
$titletoshow .= ' - <span class="opacitymedium">'.$langs->trans("Draft").'</span>';
|
||||
} elseif ($obj->fk_statut == Project::STATUS_CLOSED) {
|
||||
if ($discard_closed == 2) $disabled = 1;
|
||||
$labeltoshow .= ' - '.$langs->trans("Closed");
|
||||
} elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid))
|
||||
{
|
||||
$titletoshow .= ' - <span class="opacitymedium">'.$langs->trans("Closed").'</span>';
|
||||
} elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) {
|
||||
$disabled = 1;
|
||||
$labeltoshow .= ' - '.$langs->trans("LinkedToAnotherCompany");
|
||||
$titletoshow .= ' - <span class="opacitymedium">'.$langs->trans("LinkedToAnotherCompany").'</span>';
|
||||
}
|
||||
$labeltoshow .= ' - ';
|
||||
$titletoshow .= ' - ';
|
||||
}
|
||||
|
||||
// Label for task
|
||||
$labeltoshow .= $obj->tref.' '.dol_trunc($obj->tlabel, $maxlength);
|
||||
$titletoshow .= $obj->tref.' '.dol_trunc($obj->tlabel, $maxlength);
|
||||
|
||||
if (!empty($selected) && $selected == $obj->rowid)
|
||||
{
|
||||
$out .= '<option value="'.$obj->rowid.'" selected';
|
||||
$out .= ' data-html="'.dol_escape_htmltag($titletoshow).'"';
|
||||
//if ($disabled) $out.=' disabled'; // with select2, field can't be preselected if disabled
|
||||
$out .= '>'.$labeltoshow.'</option>';
|
||||
} else {
|
||||
@ -445,6 +452,7 @@ class FormProjets
|
||||
if ($disabled) $resultat .= ' disabled';
|
||||
//if ($obj->public) $labeltoshow.=' ('.$langs->trans("Public").')';
|
||||
//else $labeltoshow.=' ('.$langs->trans("Private").')';
|
||||
$resultat .= ' data-html="'.dol_escape_htmltag($titletoshow).'"';
|
||||
$resultat .= '>';
|
||||
$resultat .= $labeltoshow;
|
||||
$resultat .= '</option>';
|
||||
|
||||
@ -3268,7 +3268,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'intervention', 'label', 'language', 'link', 'list', 'listlight', 'lot',
|
||||
'map-marker-alt', 'member', 'money-bill-alt', 'mrp', 'note', 'next',
|
||||
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom',
|
||||
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
||||
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
||||
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
||||
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice',
|
||||
'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label',
|
||||
|
||||
@ -476,6 +476,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
$projectstatic->public = $lines[$i]->public;
|
||||
$projectstatic->title = $lines[$i]->projectlabel;
|
||||
$projectstatic->usage_bill_time = $lines[$i]->usage_bill_time;
|
||||
$projectstatic->status = $lines[$i]->projectstatus;
|
||||
|
||||
$taskstatic->id = $lines[$i]->id;
|
||||
$taskstatic->ref = $lines[$i]->ref;
|
||||
@ -881,6 +882,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
||||
$projectstatic->ref = $lines[$i]->project_ref;
|
||||
$projectstatic->title = $lines[$i]->project_label;
|
||||
$projectstatic->public = $lines[$i]->public;
|
||||
$projectstatic->status = $lines[$i]->project_status;
|
||||
|
||||
$taskstatic->id = $lines[$i]->task_id;
|
||||
$taskstatic->ref = ($lines[$i]->task_ref ? $lines[$i]->task_ref : $lines[$i]->task_id);
|
||||
@ -1843,6 +1845,7 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
||||
$projectstatic->title = $lines[$i]->projectlabel;
|
||||
$projectstatic->public = $lines[$i]->public;
|
||||
$projectstatic->thirdparty_name = $lines[$i]->thirdparty_name;
|
||||
$projectstatic->status = $lines[$i]->projectstatus;
|
||||
|
||||
$taskstatic->id = $lines[$i]->id;
|
||||
$taskstatic->ref = ($lines[$i]->ref ? $lines[$i]->ref : $lines[$i]->id);
|
||||
|
||||
@ -280,13 +280,10 @@ class ProductFournisseur extends Product
|
||||
}
|
||||
|
||||
// Multicurrency
|
||||
$multicurrency_buyprice = null;
|
||||
$multicurrency_unitBuyPrice = null;
|
||||
$fk_multicurrency = null;
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
if (empty($multicurrency_tx)) $multicurrency_tx = 1;
|
||||
if (empty($multicurrency_buyprice)) $multicurrency_buyprice = 0;
|
||||
|
||||
if (empty($multicurrency_buyprice)) $multicurrency_buyprice = 0;
|
||||
if ($multicurrency_price_base_type == 'TTC')
|
||||
{
|
||||
|
||||
@ -70,7 +70,7 @@ class MyObject extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
|
||||
* 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
|
||||
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
|
||||
* 'label' the translation key.
|
||||
* 'picto' is code of a picto to show before value in forms
|
||||
|
||||
@ -433,7 +433,7 @@ $nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' ';
|
||||
//$nav .= ' <input type="submit" name="submitdateselect" class="button valignmiddle" value="'.$langs->trans("Refresh").'">';
|
||||
$nav .= ' <button type="submit" name="button_search_x" value="x" class="bordertransp"><span class="fa fa-search"></span></button>';
|
||||
|
||||
$picto = 'calendarweek';
|
||||
$picto = 'clock';
|
||||
|
||||
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].($project->id > 0 ? '?id='.$project->id : '').'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
@ -447,7 +447,7 @@ print '<input type="hidden" name="addtimemonth" value="'.$tmp['mon'].'">';
|
||||
print '<input type="hidden" name="addtimeday" value="'.$tmp['mday'].'">';
|
||||
|
||||
$head = project_timesheet_prepare_head($mode, $usertoprocess);
|
||||
print dol_get_fiche_head($head, 'inputperday', $langs->trans('TimeSpent'), -1, 'projecttask');
|
||||
print dol_get_fiche_head($head, 'inputperday', $langs->trans('TimeSpent'), -1, $picto);
|
||||
|
||||
// Show description of content
|
||||
print '<div class="hideonsmartphone opacitymedium">';
|
||||
@ -476,6 +476,7 @@ print '<div class="colorbacktimesheet float valignmiddle">';
|
||||
$titleassigntask = $langs->transnoentities("AssignTaskToMe");
|
||||
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs));
|
||||
print '<div class="taskiddiv inline-block">';
|
||||
print img_picto('', 'projecttask');
|
||||
$formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1, 0, 0, '', '', 'all', $usertoprocess);
|
||||
print '</div>';
|
||||
print ' ';
|
||||
@ -500,22 +501,22 @@ $moreforfilter = '';
|
||||
|
||||
// If the user can view user other than himself
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone">'.$langs->trans('User').' </div>';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>';
|
||||
$includeonly = 'hierarchyme';
|
||||
if (empty($user->rights->user->user->lire)) $includeonly = array($user->id);
|
||||
$moreforfilter .= $form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200 marginleftonly');
|
||||
$moreforfilter .= img_picto($langs->trans('User'), 'user').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200 marginleftonly');
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
if (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT))
|
||||
{
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block">'.$langs->trans('Project').' </div>';
|
||||
$moreforfilter .= '<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">';
|
||||
$moreforfilter .= '<div class="inline-block"></div>';
|
||||
$moreforfilter .= img_picto($langs->trans('Project'), 'project').'<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">';
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block">'.$langs->trans('ThirdParty').' </div>';
|
||||
$moreforfilter .= '<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">';
|
||||
$moreforfilter .= '<div class="inline-block"></div>';
|
||||
$moreforfilter .= img_picto($langs->trans('ThirdParty'), 'company').'<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">';
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
@ -361,7 +361,7 @@ $nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' ';
|
||||
//$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
$nav .= ' <button type="submit" name="button_search_x" value="x" class="bordertransp"><span class="fa fa-search"></span></button>';
|
||||
|
||||
$picto = 'calendarweek';
|
||||
$picto = 'clock';
|
||||
|
||||
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
@ -372,7 +372,7 @@ print '<input type="hidden" name="month" value="'.$month.'">';
|
||||
print '<input type="hidden" name="year" value="'.$year.'">';
|
||||
|
||||
$head = project_timesheet_prepare_head($mode, $usertoprocess);
|
||||
print dol_get_fiche_head($head, 'inputpermonth', $langs->trans('TimeSpent'), -1, 'projecttask');
|
||||
print dol_get_fiche_head($head, 'inputpermonth', $langs->trans('TimeSpent'), -1, $picto);
|
||||
|
||||
// Show description of content
|
||||
print '<div class="hideonsmartphone opacitymedium">';
|
||||
@ -400,6 +400,7 @@ print '<div class="colorbacktimesheet float valignmiddle">';
|
||||
$titleassigntask = $langs->transnoentities("AssignTaskToMe");
|
||||
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs));
|
||||
print '<div class="taskiddiv inline-block">';
|
||||
print img_picto('', 'projecttask');
|
||||
$formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1);
|
||||
print '</div>';
|
||||
print ' ';
|
||||
@ -425,22 +426,22 @@ if (! empty($conf->categorie->enabled))
|
||||
|
||||
// If the user can view user other than himself
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone">'.$langs->trans('User').' </div>';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>';
|
||||
$includeonly = 'hierachyme';
|
||||
if (empty($user->rights->user->user->lire)) $includeonly = array($user->id);
|
||||
$moreforfilter .= $form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
$moreforfilter .= img_picto($langs->trans('User'), 'user').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
if (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT))
|
||||
{
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block">'.$langs->trans('Project').' </div>';
|
||||
$moreforfilter .= '<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">';
|
||||
$moreforfilter .= '<div class="inline-block"></div>';
|
||||
$moreforfilter .= img_picto($langs->trans('Project'), 'project').'<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">';
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block">'.$langs->trans('ThirdParty').' </div>';
|
||||
$moreforfilter .= '<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">';
|
||||
$moreforfilter .= '<div class="inline-block"></div>';
|
||||
$moreforfilter .= img_picto($langs->trans('ThirdParty'), 'company').'<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">';
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
@ -451,7 +451,7 @@ $nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' ';
|
||||
//$nav .= ' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
$nav .= ' <button type="submit" name="submitdateselect" value="x" class="bordertransp"><span class="fa fa-search"></span></button>';
|
||||
|
||||
$picto = 'calendarweek';
|
||||
$picto = 'clock';
|
||||
|
||||
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
@ -464,7 +464,7 @@ print '<input type="hidden" name="month" value="'.$month.'">';
|
||||
print '<input type="hidden" name="year" value="'.$year.'">';
|
||||
|
||||
$head = project_timesheet_prepare_head($mode, $usertoprocess);
|
||||
print dol_get_fiche_head($head, 'inputperweek', $langs->trans('TimeSpent'), -1, 'projecttask');
|
||||
print dol_get_fiche_head($head, 'inputperweek', $langs->trans('TimeSpent'), -1, $picto);
|
||||
|
||||
// Show description of content
|
||||
print '<div class="hideonsmartphone opacitymedium">';
|
||||
@ -492,6 +492,7 @@ print '<div class="colorbacktimesheet float valignmiddle">';
|
||||
$titleassigntask = $langs->transnoentities("AssignTaskToMe");
|
||||
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs));
|
||||
print '<div class="taskiddiv inline-block">';
|
||||
print img_picto('', 'projecttask');
|
||||
$formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1, 0, 0, '', '', 'all', $usertoprocess);
|
||||
print '</div>';
|
||||
print ' ';
|
||||
@ -555,22 +556,22 @@ if (! empty($conf->categorie->enabled))
|
||||
|
||||
// If the user can view user other than himself
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone">'.$langs->trans('User').' </div>';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>';
|
||||
$includeonly = 'hierarchyme';
|
||||
if (empty($user->rights->user->user->lire)) $includeonly = array($user->id);
|
||||
$moreforfilter .= $form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
$moreforfilter .= img_picto($langs->trans('User'), 'user').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
if (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT))
|
||||
{
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block">'.$langs->trans('Project').' </div>';
|
||||
$moreforfilter .= '<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">';
|
||||
$moreforfilter .= '<div class="inline-block"></div>';
|
||||
$moreforfilter .= img_picto($langs->trans('Project'), 'project').'<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">';
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block">'.$langs->trans('ThirdParty').' </div>';
|
||||
$moreforfilter .= '<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">';
|
||||
$moreforfilter .= '<div class="inline-block"></div>';
|
||||
$moreforfilter .= img_picto($langs->trans('ThirdParty'), 'company').'<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">';
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
@ -1046,13 +1046,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
||||
|
||||
$title = $langs->trans("ListTaskTimeUserProject");
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $linktocreatetime, '', $limit, 0, 0, 1);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1);
|
||||
} else {
|
||||
print '<!-- List of time spent for project -->'."\n";
|
||||
|
||||
$title = $langs->trans("ListTaskTimeForTask");
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $linktocreatetime, '', $limit, 0, 0, 1);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1);
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
@ -1120,7 +1120,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
||||
else $userid = $contactsofproject[0];
|
||||
|
||||
if ($projectstatic->public) $contactsofproject = array();
|
||||
print $form->select_dolusers((GETPOST('userid', 'int') ? GETPOST('userid', 'int') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'maxwidth200');
|
||||
print $form->select_dolusers((GETPOST('userid', 'int') ? GETPOST('userid', 'int') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'maxwidth250');
|
||||
} else {
|
||||
if ($nboftasks) {
|
||||
print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime');
|
||||
@ -1204,7 +1204,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
||||
if (!empty($arrayfields['t.task_label']['checked'])) print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'"></td>';
|
||||
}
|
||||
// Author
|
||||
if (!empty($arrayfields['author']['checked'])) print '<td class="liste_titre">'.$form->select_dolusers(($search_user > 0 ? $search_user : -1), 'search_user', 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth150').'</td>';
|
||||
if (!empty($arrayfields['author']['checked'])) print '<td class="liste_titre">'.$form->select_dolusers(($search_user > 0 ? $search_user : -1), 'search_user', 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250').'</td>';
|
||||
// Note
|
||||
if (!empty($arrayfields['t.note']['checked'])) print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>';
|
||||
// Duration
|
||||
|
||||
@ -1304,11 +1304,11 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
.minwidth500imp { min-width: 250px !important; }
|
||||
}
|
||||
|
||||
select.widthcentpercentminusx, input.widthcentpercentminusx {
|
||||
select.widthcentpercentminusx, span.widthcentpercentminusx, input.widthcentpercentminusx {
|
||||
width: calc(100% - 52px) !important;
|
||||
display: inline-block;
|
||||
}
|
||||
select.widthcentpercentminusxx, input.widthcentpercentminusxx {
|
||||
select.widthcentpercentminusxx, span.widthcentpercentminusxx, input.widthcentpercentminusxx {
|
||||
width: calc(100% - 70px) !important;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@ -1295,7 +1295,7 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
.minwidth500imp { min-width: 250px !important; }
|
||||
}
|
||||
|
||||
/* Set a width. Note: add also a max-width that will be used in priority */
|
||||
/* Set a width. Note: add also a max-width, for example maxwidth500, that will be used in priority */
|
||||
.widthcentpercentminusx {
|
||||
width: calc(100% - 50px) !important;
|
||||
display: inline-block;
|
||||
@ -1335,7 +1335,7 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
padding-left: 0;
|
||||
}
|
||||
.login_table input#username, .login_table input#password, .login_table input#securitycode {
|
||||
margin-left: 5px !important;
|
||||
margin-left: 5px !important;
|
||||
}
|
||||
div#login_left, div#login_right {
|
||||
min-width: 150px !important;
|
||||
@ -2383,7 +2383,7 @@ form#login {
|
||||
border-radius: 2px;
|
||||
}
|
||||
.login_table .tdinputlogin {
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
.login_table .tdinputlogin .fa {
|
||||
padding-left: 10px;
|
||||
|
||||
@ -3628,11 +3628,11 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of
|
||||
|
||||
print '<tr><td class="toptd">'.$form->editfieldkey('Categories', 'categories', '', $objectpage, 0).'</td><td>';
|
||||
print img_picto('', 'category', 'class="paddingright"');
|
||||
print $form->multiselectarray('categories', $cate_arbo, (GETPOSTISSET('categories') ? GETPOST('categories', 'array') : $arrayselected), null, null, 'quatrevingtpercent widthcentpercentminusx');
|
||||
print $form->multiselectarray('categories', $cate_arbo, (GETPOSTISSET('categories') ? GETPOST('categories', 'array') : $arrayselected), null, null, 'minwidth200 widthcentpercentminusxx');
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
if (!empty($conf->global->WEBSITE_PAGE_SHOW_INTERNAL_LINKS_TO_OBJECT)) {
|
||||
if (!empty($conf->global->WEBSITE_PAGE_SHOW_INTERNAL_LINKS_TO_OBJECT)) { // TODO Replace this with link into element_element ?
|
||||
print '<tr><td class="titlefieldcreate">';
|
||||
print 'ObjectClass';
|
||||
print '</td><td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user