Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2023-02-13 13:51:35 +01:00
commit 19bfb021e1
54 changed files with 330 additions and 196 deletions

View File

@ -147,12 +147,12 @@ if (($action == 'add' || (GETPOST('add') && $action != 'update')) || GETPOST('ac
$object->value=$defaultvalue;
$object->entity=$conf->entity;
$result=$object->create($user);
if ($result<0) {
if ($result < 0) {
$action = '';
setEventMessages($object->error, $object->errors, 'errors');
} else {
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
$action = "";
$action = '';
$defaulturl = '';
$defaultkey = '';
$defaultvalue = '';
@ -324,16 +324,16 @@ print "\n";
print '<tr class="oddeven">';
// Page
print '<td>';
print '<input type="text" class="flat minwidth200 maxwidthonsmartphone" name="defaulturl" value="'.dol_escape_htmltag(GETPOST('defaulturl', 'alphanohtml')).'">';
print '<input type="text" class="flat minwidth200 maxwidthonsmartphone" name="defaulturl" value="'.dol_escape_htmltag($defaulturl).'">';
print '</td>'."\n";
// Field
print '<td>';
print '<input type="text" class="flat maxwidth100onsmartphone" name="defaultkey" value="'.dol_escape_htmltag(GETPOST('defaultkey', 'alphanohtml')).'">';
print '<input type="text" class="flat maxwidth100onsmartphone" name="defaultkey" value="'.dol_escape_htmltag($defaultkey).'">';
print '</td>';
// Value
if ($mode != 'focus' && $mode != 'mandatory') {
print '<td>';
print '<input type="text" class="flat maxwidth100onsmartphone" name="defaultvalue" value="">';
print '<input type="text" class="flat maxwidth100onsmartphone" name="defaultvalue" value="'.dol_escape_htmltag($defaultvalue).'">';
print '</td>';
}
// Limit to superadmin

View File

@ -722,7 +722,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Add operation
print '<tr class="oddeven nodrag nodrop">';
print '<td>';
print $form->selectarray('operationtype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', 'maxwidth300', 1);
print $form->selectarray('operationtype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', 'minwidth150 maxwidth300', 1);
print '</td><td>';
//print '<input type="text" name="operationparam">';
$htmltext = $langs->transnoentitiesnoconv("OperationParamDesc");

View File

@ -680,17 +680,27 @@ if (!empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu
}
// Confirmation de la suppression de la ligne
// Confirm deletion of record
if ($action == 'delete') {
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.((int) $rowid).'&code='.urlencode($code).'&id='.((int) $id), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
}
$fieldlist = explode(',', $tabfield[$id]);
if ($action == 'create') {
// If data was already input, we define them in obj to populate input fields.
$obj = new stdClass();
$obj->label = GETPOST('label');
$obj->lang = GETPOST('lang');
$obj->type_template = GETPOST('type_template');
$obj->fk_user = GETPOST('fk_user', 'int');
$obj->private = GETPOST('private', 'int');
$obj->position = GETPOST('position');
$obj->topic = GETPOST('topic');
$obj->joinfiles = GETPOST('joinfiles');
$obj->content = GETPOST('content', 'restricthtml');
// Form to add a new line
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
@ -769,16 +779,6 @@ if ($action == 'create') {
print '</th>';
print '</tr>';
$obj = new stdClass();
// If data was already input, we define them in obj to populate input fields.
if (GETPOST('actionadd')) {
foreach ($fieldlist as $key => $val) {
if (GETPOST($val) != '') {
$obj->$val = GETPOST($val);
}
}
}
$tmpaction = 'create';
$parameters = array(
'fieldlist' => $fieldlist,
@ -836,7 +836,6 @@ if ($action == 'create') {
if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) {
$okforextended = false;
}
$doleditor = new DolEditor($tmpfieldlist, (!empty($obj->$tmpfieldlist) ? $obj->$tmpfieldlist : ''), '', 180, 'dolibarr_mailings', 'In', false, $acceptlocallinktomedia, $okforextended, ROWS_4, '90%');
print $doleditor->Create(1);
}
@ -856,7 +855,7 @@ if ($action == 'create') {
print '</div>';
print '</form>';
print '<br><br>';
} // END IF not edit
}
// List of available record in database
dol_syslog("htdocs/admin/dict", LOG_DEBUG);

View File

@ -218,6 +218,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<td class="linecolstock right">'.$form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1).'</td>';
print '<td class="linecoltheoricalstock right">'.$form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc")).'</td>';
print '</tr>';
print '</thead>';
print '<tbody>';
if (!empty($TChildBom)) {
if ($action == 'treeview') {
foreach ($TChildBom as $fk_bom => $TProduct) {
@ -266,7 +269,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
}
}
print '</thead>';
print '</tbody>';
print '</table>';

View File

@ -301,6 +301,16 @@ if ($resql) {
$sub_bom->calculateCosts();
print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'"><span class="amount">'.price(price2num($sub_bom->total_cost * $sub_bom_line->qty * $line->qty, 'MT')).'</span></td>';
$total_cost+= $sub_bom->total_cost * $sub_bom_line->qty * $line->qty;
} elseif ($sub_bom_product->type == Product::TYPE_SERVICE && isModEnabled('workstation') && !empty($sub_bom_product->fk_default_workstation)) {
//Convert qty to hour
$unit = measuringUnitString($sub_bom_line->fk_unit, '', '', 1);
$qty = convertDurationtoHour($sub_bom_line->qty, $unit);
$workstation = new Workstation($this->db);
$res = $workstation->fetch($sub_bom_product->fk_default_workstation);
if ($res > 0) $sub_bom_line->total_cost = price2num($qty * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'"><span class="amount">'.price(price2num($sub_bom_line->total_cost, 'MT')).'</span></td>';
$this->total_cost += $line->total_cost;
} elseif ($sub_bom_product->cost_price > 0) {
print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'"><span class="amount">'.price(price2num($sub_bom_product->cost_price * $sub_bom_line->qty * $line->qty, 'MT')).'</span></td>';
$total_cost+= $sub_bom_product->cost_price * $sub_bom_line->qty * $line->qty;

View File

@ -1005,7 +1005,7 @@ if ($type == Categorie::TYPE_PROJECT) {
print '<input type="hidden" name="action" value="addintocategory">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>';
print $langs->trans("AddProjectIntoCategory").' &nbsp;';
print $langs->trans("AddObjectIntoCategory").' &nbsp;';
$form->selectProjects('', 'elemid');
print '<input type="submit" class="button buttongen" value="'.$langs->trans("ClassifyInCategory").'"></td>';
print '</tr>';

View File

@ -119,9 +119,9 @@ $usercanreopen = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights
$usercanunvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->facture->invoice_advance->unvalidate)));
$usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS));
$usercancreatemargin = $user->rights->margins->creer;
$usercanreadallmargin = $user->rights->margins->liretous;
$usercancreatewithdrarequest = $user->rights->prelevement->bons->creer;
$usercancreatemargin = $user->hasRight("margins", "creer");
$usercanreadallmargin = $user->hasRight("margins", "liretous");
$usercancreatewithdrarequest = $user->hasRight("prelevement", "bons", "creer");
$now = dol_now();

View File

@ -3118,7 +3118,11 @@ if ($action == 'create') {
}
// when bank account is empty (means not override by payment mode form a other object, like third-party), try to use default value
$fk_account = GETPOSTISSET("fk_account") ? GETPOST("fk_account", 'int') : $fk_account;
if ($socid > 0 && $fk_account) { // A company has already been set and it has a default fk_account
$fk_account = GETPOSTISSET('fk_account') ? GETPOST("fk_account", 'int') : $fk_account; // The GETPOST is used only if form was posted to avoid to take default value, because in such case, the default must be the one of the company
} else { // No company forced
$fk_account = GETPOST("fk_account", 'int');
}
if (!empty($soc->id)) {
$absolute_discount = $soc->getAvailableDiscounts();

View File

@ -58,7 +58,6 @@ if (!isset($usedbyinclude) || empty($usedbyinclude)) {
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
//global $hookmanager;
$hookmanager->initHooks(array('searchform'));
$search_boxvalue = GETPOST('q', 'restricthtml');

View File

@ -1371,12 +1371,13 @@ abstract class CommonObject
*
* @param int $statusoflink Status of links to get (-1=all). Not used.
* @param string $source Source of contact: 'external' or 'thirdparty' (llx_socpeople) or 'internal' (llx_user)
* @param int $list 0:Return array contains all properties, 1:Return array contains just id
* @param int $list 0:Returned array contains all properties, 1:Return array contains just id
* @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...)
* @param int $status Status of user or company
* @param array $arrayoftcids Array with ID of type of contacts. If we provide this, we can make a ec.fk_c_type_contact in ($arrayoftcids) to avoid link on tc table. TODO Not implemented.
* @return array|int Array of contacts, -1 if error
*/
public function liste_contact($statusoflink = -1, $source = 'external', $list = 0, $code = '', $status = -1)
public function liste_contact($statusoflink = -1, $source = 'external', $list = 0, $code = '', $status = -1, $arrayoftcids = array())
{
// phpcs:enable
global $langs;
@ -1418,7 +1419,7 @@ abstract class CommonObject
$sql .= " AND t.statut = ".((int) $status); // t is llx_socpeople
}
}
$sql .= " AND tc.active=1";
$sql .= " AND tc.active = 1";
if ($statusoflink >= 0) {
$sql .= " AND ec.statut = ".((int) $statusoflink);
}

View File

@ -127,6 +127,7 @@ class HookManager
}
}
}
// Log the init of hook but only for hooks thare are declared to be managed
if (count($arraytolog) > 0) {
dol_syslog(get_class($this)."::initHooks Loading hooks: ".join(', ', $arraytolog), LOG_DEBUG);
}
@ -237,7 +238,10 @@ class HookManager
$actionclassinstance->error = 0;
$actionclassinstance->errors = array();
dol_syslog(get_class($this)."::executeHooks Qualified hook found (hooktype=".$hooktype."). We call method ".get_class($actionclassinstance).'->'.$method.", context=".$context.", module=".$module.", action=".$action.((is_object($object) && property_exists($object, 'id')) ? ', object id='.$object->id : '').((is_object($object) && property_exists($object, 'element')) ? ', object element='.$object->element : ''), LOG_DEBUG);
if (getDolGlobalInt('MAIN_DEBUG_SHOW_EACH_QUALIFIED_HOOK_CALL') >= 2) {
// This his too much verbose, enabled in develop only
dol_syslog(get_class($this)."::executeHooks Qualified hook found (hooktype=".$hooktype."). We call method ".get_class($actionclassinstance).'->'.$method.", context=".$context.", module=".$module.", action=".$action.((is_object($object) && property_exists($object, 'id')) ? ', object id='.$object->id : '').((is_object($object) && property_exists($object, 'element')) ? ', object element='.$object->element : ''), LOG_DEBUG);
}
// Add current context to avoid method execution in bad context, you can add this test in your method : eg if($currentcontext != 'formfile') return;
// Note: The hook can use the $currentcontext in its code to avoid to be ran twice or be ran for one given context only

View File

@ -5130,10 +5130,12 @@ class Form
$i = 0;
foreach ($input['values'] as $selkey => $selval) {
$more .= '<div class="tagtr">';
if ($i == 0) {
$more .= '<div class="tagtd'.(empty($input['tdclass']) ? ' tdtop' : (' tdtop '.$input['tdclass'])).'">'.$input['label'].'</div>';
} else {
$more .= '<div clas="tagtd'.(empty($input['tdclass']) ? '' : (' "'.$input['tdclass'])).'">&nbsp;</div>';
if (isset($input['label'])) {
if ($i == 0) {
$more .= '<div class="tagtd'.(empty($input['tdclass']) ? ' tdtop' : (' tdtop '.$input['tdclass'])).'">'.$input['label'].'</div>';
} else {
$more .= '<div clas="tagtd'.(empty($input['tdclass']) ? '' : (' "'.$input['tdclass'])).'">&nbsp;</div>';
}
}
$more .= '<div class="tagtd'.($i == 0 ? ' tdtop' : '').'"><input type="radio" class="flat'.$morecss.'" id="'.dol_escape_htmltag($input['name'].$selkey).'" name="'.dol_escape_htmltag($input['name']).'" value="'.$selkey.'"'.$moreattr;
if (!empty($input['disabled'])) {
@ -8456,8 +8458,13 @@ class Form
}
}
// Try also magic suggest
$out .= '<select id="'.$htmlname.'" class="multiselect'.($morecss ? ' '.$morecss : '').'" multiple name="'.$htmlname.'[]"'.($moreattrib ? ' '.$moreattrib : '').($width ? ' style="width: '.(preg_match('/%/', $width) ? $width : $width.'px').'"' : '').'>'."\n";
$useenhancedmultiselect = 0;
if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) {
$useenhancedmultiselect = 1;
}
// Output select component
$out .= '<select id="'.$htmlname.'" class="multiselect'.($useenhancedmultiselect ? ' multiselectononeline' : '').($morecss ? ' '.$morecss : '').'" multiple name="'.$htmlname.'[]"'.($moreattrib ? ' '.$moreattrib : '').($width ? ' style="width: '.(preg_match('/%/', $width) ? $width : $width.'px').'"' : '').'>'."\n";
if (is_array($array) && !empty($array)) {
if ($value_as_key) {
$array = array_combine($array, $array);

View File

@ -920,6 +920,9 @@ class FormFile
}
if (is_object($hookmanager)) {
$addcolumforpicto = ($delallowed || $printer || $morepicto);
$colspan = (4 + ($addcolumforpicto ? 1 : 0));
$colspanmore = 0;
$parameters = array('colspan'=>($colspan + $colspanmore), 'socid'=>(isset($GLOBALS['socid']) ? $GLOBALS['socid'] : ''), 'id'=>(isset($GLOBALS['id']) ? $GLOBALS['id'] : ''), 'modulepart'=>$modulepart, 'relativepath'=>$relativepath);
$res = $hookmanager->executeHooks('formBuilddocLineOptions', $parameters, $file);
if (empty($res)) {

View File

@ -66,6 +66,8 @@ print "jQuery(document).ready(function () {\n";
print ' var nowtime = Date.now();';
print ' var time_auto_update = '.max(1, getDolGlobalInt('MAIN_BROWSER_NOTIFICATION_FREQUENCY')).';'."\n"; // Always defined
print ' var time_js_next_test;'."\n";
print ' var dolnotif_nb_test_for_page = 0;'."\n";
print ' var dolnotif_idinterval = null;'."\n";
?>
/* Check if Notification is supported */
@ -82,7 +84,7 @@ if ("Notification" in window) {
//var time_first_execution = (time_auto_update + (time_js_next_test - nowtime)) * 1000; //need milliseconds
var time_first_execution = <?php echo max(3, empty($conf->global->MAIN_BROWSER_NOTIFICATION_CHECK_FIRST_EXECUTION) ? 0 : $conf->global->MAIN_BROWSER_NOTIFICATION_CHECK_FIRST_EXECUTION); ?>;
setTimeout(first_execution, time_first_execution * 1000);
setTimeout(first_execution, time_first_execution * 1000); // Launch a first execution after a time_first_execution delay
time_js_next_test = nowtime + time_first_execution;
console.log("Launch browser notif check: setTimeout is set to launch 'first_execution' function after a wait of time_first_execution="+time_first_execution+". nowtime (time php page generation) = "+nowtime+" time_js_next_check = "+time_js_next_test);
} else {
@ -91,14 +93,19 @@ if ("Notification" in window) {
function first_execution() {
console.log("Call first_execution then set repeat time to time_auto_update = MAIN_BROWSER_NOTIFICATION_FREQUENCY = "+time_auto_update);
check_events(); //one check before setting the new time for other checks
setInterval(check_events, time_auto_update * 1000); // Set new time to run next check events
console.log("Call first_execution of check_events()");
result = check_events(); //one check before setting the new time for other checks
if (result > 0) {
console.log("check_events() is scheduled as a repeated task with a time_auto_update = MAIN_BROWSER_NOTIFICATION_FREQUENCY = "+time_auto_update+"s");
dolnotif_idinterval = setInterval(check_events, time_auto_update * 1000); // Set new time to run next check events. time_auto_update=nb of seconds
}
}
function check_events() {
if (Notification.permission === "granted")
{
var result = 0;
dolnotif_nb_test_for_page += 1;
if (Notification.permission === "granted") {
var currentToken = 'notrequired';
const allMeta = document.getElementsByTagName("meta");
for (let i = 0; i < allMeta.length; i++) {
@ -108,7 +115,8 @@ function check_events() {
}
}
time_js_next_test += time_auto_update;
console.log("Call ajax to check events with time_js_next_test = "+time_js_next_test);
console.log("Call ajax to check events with time_js_next_test = "+time_js_next_test+" dolnotif_nb_test_for_page="+dolnotif_nb_test_for_page);
$.ajax("<?php print DOL_URL_ROOT.'/core/ajax/check_notifications.php'; ?>", {
type: "post", // Usually post or get
@ -184,15 +192,24 @@ function check_events() {
data: { time_js_next_test: time_js_next_test, token: currentToken }
});
} else {
console.log("No reminder to do found, next search at "+time_js_next_test);
console.log("No remind to do found, next search at "+time_js_next_test);
}
}
});
result = 1;
} else {
console.log("Cancel check_events() with dolnotif_nb_test_for_page="+dolnotif_nb_test_for_page+". Check is useless because javascript Notification.permission is "+Notification.permission+" (blocked manualy or web site is not https).");
result = 2; // We return a positive so the repeated check will done even if authroization is not yet allowed may be after this check)
}
else
{
console.log("Cancel check_events. Useless because javascript Notification.permission is "+Notification.permission+" (blocked manualy or web site is not https).");
if (dolnotif_nb_test_for_page >= 5) {
console.log("We did "+dolnotif_nb_test_for_page+" consecutive test on this page. We stop checking now from here by clearing dolnotif_idinterval="+dolnotif_idinterval);
clearInterval(dolnotif_idinterval);
}
return result;
}
<?php

View File

@ -421,6 +421,9 @@ function dol_shutdown()
/**
* Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
* Warning:
* For action=add, use: $var = GETPOST('var'); // No GETPOSTISSET, so GETPOST always called and default value is retreived if not a form POST, and value of form is retreived if it is a form POST.
* For action=update, use: $var = GETPOSTISSET('var') ? GETPOST('var') : $object->var;
*
* @param string $paramname Name or parameter to test
* @return boolean True if we have just submit a POST or GET request with the parameter provided (even if param is empty)
@ -4095,7 +4098,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'autofill', 'folder', 'folder-open', 'folder-plus',
'gears', 'generate', 'globe', 'globe-americas', 'graph', 'grip', 'grip_title', 'group',
'help', 'holiday',
'id-card', 'images', 'incoterm', 'info', 'intervention', 'inventory', 'intracommreport', 'knowledgemanagement',
'id-card', 'images', 'incoterm', 'info', 'intervention', 'inventory', 'intracommreport', 'jobprofile',
'knowledgemanagement',
'label', 'language', 'line', 'link', 'list', 'list-alt', 'listlight', 'loan', 'lock', 'lot', 'long-arrow-alt-right',
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'movement', 'mrp', 'note', 'next',
'off', 'on', 'order',
@ -4110,7 +4114,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'technic', 'ticket',
'error', 'warning',
'recent', 'reception', 'recruitmentcandidature', 'recruitmentjobposition', 'replacement', 'resource', 'recurring','rss',
'shapes', 'square', 'stop-circle', 'supplier', 'supplier_proposal', 'supplier_order', 'supplier_invoice',
'shapes', 'skill', 'square', 'stop-circle', 'supplier', 'supplier_proposal', 'supplier_order', 'supplier_invoice',
'timespent', 'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda',
'uncheck', 'url', 'user-cog', 'user-injured', 'user-md', 'vat', 'website', 'workstation', 'webhook', 'world', 'private',
'conferenceorbooth', 'eventorganization',
@ -4142,7 +4146,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'email'=>'at', 'establishment'=>'building', 'edit'=>'pencil-alt', 'entity'=>'globe',
'graph'=>'chart-line', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
'generic'=>'file', 'holiday'=>'umbrella-beach',
'info'=>'info-circle', 'inventory'=>'boxes', 'intracommreport'=>'globe-europe', 'knowledgemanagement'=>'ticket-alt', 'label'=>'layer-group', 'line'=>'bars', 'loan'=>'money-bill-alt',
'info'=>'info-circle', 'inventory'=>'boxes', 'intracommreport'=>'globe-europe', 'jobprofile'=>'cogs',
'knowledgemanagement'=>'ticket-alt', 'label'=>'layer-group', 'line'=>'bars', 'loan'=>'money-bill-alt',
'member'=>'user-alt', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
'trip'=>'wallet', 'expensereport'=>'wallet', 'group'=>'users', 'movement'=>'people-carry',
'sign-out'=>'sign-out-alt',
@ -4158,7 +4163,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature',
'refresh'=>'redo', 'region'=>'map-marked', 'replacement'=>'exchange-alt', 'resource'=>'laptop-house', 'recurring'=>'history',
'service'=>'concierge-bell',
'state'=>'map-marked-alt', 'security'=>'key', 'salary'=>'wallet', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'stripe'=>'stripe-s',
'skill'=>'shapes', 'state'=>'map-marked-alt', 'security'=>'key', 'salary'=>'wallet', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'stripe'=>'stripe-s',
'supplier'=>'building', 'technic'=>'cogs',
'timespent'=>'clock', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach',
'title_agenda'=>'calendar-alt',
@ -5370,10 +5375,10 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pict
$return .= '<div class="titre inline-block">'.$titre.'</div>';
$return .= '</td>';
if (dol_strlen($morehtmlcenter)) {
$return .= '<td class="nobordernopadding center valignmiddle">'.$morehtmlcenter.'</td>';
$return .= '<td class="nobordernopadding center valignmiddle col-center">'.$morehtmlcenter.'</td>';
}
if (dol_strlen($morehtmlright)) {
$return .= '<td class="nobordernopadding titre_right wordbreakimp right valignmiddle">'.$morehtmlright.'</td>';
$return .= '<td class="nobordernopadding titre_right wordbreakimp right valignmiddle col-right">'.$morehtmlright.'</td>';
}
$return .= '</tr></table>'."\n";
@ -5445,11 +5450,11 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
// Center
if ($morehtmlcenter) {
print '<td class="nobordernopadding center valignmiddle">'.$morehtmlcenter.'</td>';
print '<td class="nobordernopadding center valignmiddle col-center">'.$morehtmlcenter.'</td>';
}
// Right
print '<td class="nobordernopadding valignmiddle right">';
print '<td class="nobordernopadding valignmiddle right col-right">';
print '<input type="hidden" name="pageplusoneold" value="'.((int) $page + 1).'">';
if ($sortfield) {
$options .= "&sortfield=".urlencode($sortfield);
@ -9804,7 +9809,7 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0)
$value = preg_replace('/\*/', '%', $value); // Replace * with %
}
if ($mode == 1) {
$value = preg_replace('/([<>=]+)\s+([0-9'.preg_quote($langs->trans("DecimalSeparator"), '/').'\-])/', '\1\2', $value); // Clean string '< 10' into '<10' so we can the explode on space to get all tests to do
$value = preg_replace('/([!<>=]+)\s+([0-9'.preg_quote($langs->trans("DecimalSeparator"), '/').'\-])/', '\1\2', $value); // Clean string '< 10' into '<10' so we can the explode on space to get all tests to do
}
$value = preg_replace('/\s*\|\s*/', '|', $value);
@ -9824,10 +9829,10 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0)
foreach ($fields as $field) {
if ($mode == 1) {
$operator = '=';
$newcrit = preg_replace('/([<>=]+)/', '', $crit);
$newcrit = preg_replace('/([!<>=]+)/', '', $crit);
$reg = array();
preg_match('/([<>=]+)/', $crit, $reg);
preg_match('/([!<>=]+)/', $crit, $reg);
if (!empty($reg[1])) {
$operator = $reg[1];
}

View File

@ -2276,7 +2276,7 @@ function get_left_menu_hrm($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu =
//$newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("List"), 1, $user->hasRight('hrm', 'all', 'read'));
// Job (Description of work to do and skills required)
$newmenu->add("/hrm/job_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("JobsPosition"), 1, $user->hasRight('hrm', 'all', 'read'), '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
$newmenu->add("/hrm/job_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("JobsProfiles"), 1, $user->hasRight('hrm', 'all', 'read'), '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
//$newmenu->add("/hrm/job_card.php?mainmenu=hrm&leftmenu=hrm_sm&action=create", $langs->transnoentities("NewObject", $langs->trans("Job")), 1, $user->hasRight('hrm', 'all', 'write'));
//$newmenu->add("/hrm/job_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("List"), 1, $user->hasRight('hrm', 'all', 'read'));

View File

@ -1618,7 +1618,7 @@ class pdf_sponge extends ModelePDFFactures
// Get Total HT
$total_ht = (isModEnabled("multicurrency") && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$total_ht = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
// Total remise
$total_line_remise = 0;

View File

@ -77,7 +77,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
// Setting the prefix
$texte .= '<tr><td><span class="opacitymedium">'.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").'):</span></td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskinvoice" value="'.$conf->global->FACTURE_MERCURE_MASK_INVOICE.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskinvoice" value="'.getDolGlobalString("FACTURE_MERCURE_MASK_INVOICE").'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="3">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -85,17 +85,17 @@ class mod_facture_mercure extends ModeleNumRefFactures
// Prefix setting of replacement invoices
$texte .= '<tr><td><span class="opacitymedium">'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):</span></td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskreplacement" value="'.$conf->global->FACTURE_MERCURE_MASK_REPLACEMENT.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskreplacement" value="'.getDolGlobalString("FACTURE_MERCURE_MASK_REPLACEMENT").'">', $tooltip, 1, 1).'</td>';
$texte .= '</tr>';
// Prefix setting of credit note
$texte .= '<tr><td><span class="opacitymedium">'.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):</span></td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskcredit" value="'.$conf->global->FACTURE_MERCURE_MASK_CREDIT.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskcredit" value="'.getDolGlobalString("FACTURE_MERCURE_MASK_CREDIT").'">', $tooltip, 1, 1).'</td>';
$texte .= '</tr>';
// Prefix setting of deposit
$texte .= '<tr><td><span class="opacitymedium">'.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):</span></td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskdeposit" value="'.$conf->global->FACTURE_MERCURE_MASK_DEPOSIT.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskdeposit" value="'.getDolGlobalString("FACTURE_MERCURE_MASK_DEPOSIT").'">', $tooltip, 1, 1).'</td>';
$texte .= '</tr>';
$texte .= '</table>';

View File

@ -461,7 +461,7 @@ class mailing_contacts1 extends MailingTargets
'other' =>
($langs->transnoentities("ThirdParty").'='.$obj->companyname).';'.
($langs->transnoentities("UserTitle").'='.($obj->civility_id ? $langs->transnoentities("Civility".$obj->civility_id) : '')).';'.
($langs->transnoentities("JobPosition").'='.$obj->jobposition),
($langs->transnoentities("PostOrFunction").'='.$obj->jobposition),
'source_url' => $this->url($obj->id),
'source_id' => $obj->id,
'source_type' => 'contact'

View File

@ -453,7 +453,6 @@ if ($action == 'confirm_crop') {
if ($result < 0) {
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
}
$result = $ecmfile->create($user);
}
if ($backtourl) {

View File

@ -2278,7 +2278,7 @@ if ($action == 'create') {
// Standard invoice
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input type="radio" id="radio_standard" name="type" value="0"'.(GETPOST('type', 'int')? '' : 'checked').'> ';
$desc = $form->textwithpicto($tmp.$langs->trans("InvoiceStandardAsk"), $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3);
$desc = $form->textwithpicto($tmp.'<label for="radio_standard">'.$langs->trans("InvoiceStandardAsk").'</label>', $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3);
print $desc;
print '</div></div>';
@ -2456,7 +2456,7 @@ if ($action == 'create') {
});
});
</script>';
$text = $tmp.$langs->transnoentities("InvoiceAvoirAsk").' ';
$text = $tmp.'<label for="radio_creditnote">'.$langs->transnoentities("InvoiceAvoirAsk").'</label> ';
// $text.='<input type="text" value="">';
$text .= '<select class="flat valignmiddle" name="fac_avoir" id="fac_avoir"';
if (!$optionsav) {
@ -2521,16 +2521,16 @@ if ($action == 'create') {
print $form->selectDate($dateinvoice, '', '', '', '', "add", 1, 1);
print '</td></tr>';
// Due date
print '<tr><td>'.$langs->trans('DateMaxPayment').'</td><td>';
print $form->selectDate($datedue, 'ech', '', '', '', "add", 1, 1);
print '</td></tr>';
// Payment term
print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>';
print $form->getSelectConditionsPaiements(GETPOSTISSET('cond_reglement_id') ?GETPOST('cond_reglement_id', 'int') : $cond_reglement_id, 'cond_reglement_id');
print '</td></tr>';
// Due date
print '<tr><td>'.$langs->trans('DateMaxPayment').'</td><td>';
print $form->selectDate($datedue, 'ech', '', '', '', "add", 1, 1);
print '</td></tr>';
// Payment mode
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td>';
print img_picto('', 'bank', 'class="pictofixedwidth"');

View File

@ -67,7 +67,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
$textobject = $langs->transnoentitiesnoconv("JobPosition");
$textobject = $langs->transnoentitiesnoconv("JobProfile");
$help_url = '';
$page_name = "HrmSetup";

View File

@ -119,7 +119,7 @@ class Evaluation extends CommonObject
'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'default'=>0, 'visible'=>5, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '6' => 'Closed'),),
'date_eval' => array('type'=>'date', 'label'=>'DateEval', 'enabled'=>'1', 'position'=>502, 'notnull'=>1, 'visible'=>1,),
'fk_user' => array('type'=>'integer:User:user/class/user.class.php:0', 'label'=>'User', 'enabled'=>'1', 'position'=>504, 'notnull'=>1, 'visible'=>1,),
'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'JobPosition', 'enabled'=>'1', 'position'=>505, 'notnull'=>1, 'visible'=>1,),
'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'JobProfile', 'enabled'=>'1', 'position'=>505, 'notnull'=>1, 'visible'=>1,),
);
public $rowid;
public $ref;

View File

@ -110,7 +110,7 @@ class Position extends CommonObject
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
'fk_contrat' => array('type'=>'integer:Contrat:contrat/class/contrat.class.php', 'label'=>'fk_contrat', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>0,),
'fk_user' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Employee', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'default'=>0),
'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'JobPosition', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1,),
'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'JobProfile', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1,),
'date_start' => array('type'=>'date', 'label'=>'DateStart', 'enabled'=>'1', 'position'=>51, 'notnull'=>1, 'visible'=>1,),
'date_end' => array('type'=>'date', 'label'=>'DateEnd', 'enabled'=>'1', 'position'=>52, 'notnull'=>0, 'visible'=>1,),
'abort_comment' => array('type'=>'varchar(255)', 'label'=>'AbandonmentComment', 'enabled'=>'getDolGlobalInt("HRM_JOB_POSITON_ENDING_COMMENT")', 'position'=>502, 'notnull'=>0, 'visible'=>1,),

View File

@ -155,7 +155,7 @@ $fk_usergroup1 = GETPOST('fk_usergroup1');
$TJobs[$j->id] = $j->label;
}
print $form->selectarray('fk_job', $TJobs, $fk_job, 1);
print img_picto('', 'jobprofile', 'class="pictofixedwidth"').$form->selectarray('fk_job', $TJobs, $fk_job, 1);
?></td>
</tr>
</table>

View File

@ -96,8 +96,10 @@ $permissiontoread = $user->rights->hrm->evaluation->read; // Used by the include
//if ($user->socid > 0) accessforbidden();
//if ($user->socid > 0) $socid = $user->socid;
//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
if (empty($conf->hrm->enabled)) accessforbidden();
//restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, 'fk_soc', 'rowid', $isdraft);
if (!isModEnabled('hrm')) {
accessforbidden();
}
if (!$permissiontoread) accessforbidden();
@ -155,10 +157,10 @@ if ($object->id > 0) {
$morehtmlref .= $langs->trans('Label').' : '.$object->label;
$u_position = new User(($db));
$u_position->fetch($object->fk_user);
$morehtmlref .= '<br>'.$langs->trans('Employee').' : '.$u_position->getNomUrl(1);
$morehtmlref .= '<br>'.$u_position->getNomUrl(1);
$job = new Job($db);
$job->fetch($object->fk_job);
$morehtmlref .= '<br>'.$langs->trans('JobPosition').' : '.$job->getNomUrl(1);
$morehtmlref .= '<br>'.$langs->trans('JobProfile').' : '.$job->getNomUrl(1);
$morehtmlref .= '</div>';
@ -196,21 +198,25 @@ if ($object->id > 0) {
//$out.="</a>";
}
$morehtmlright = '';
print '<div class="tabsAction">';
//$messagingUrl = DOL_URL_ROOT.'/societe/messaging.php?socid='.$object->id;
//$morehtmlright .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1);
//$messagingUrl = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id;
//$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2);
if (isModEnabled('agenda')) {
if (!empty($user->rights->agenda->myactions->create) || $user->hasRight('agenda', 'allactions', 'create')) {
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>';
if ($user->hasRight('agenda', 'myactions', 'create') || $user->hasRight('agenda', 'allactions', 'create')) {
$morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out);
} else {
print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AddAction").'</a>';
$morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out, '', 0);
}
}
print '</div>';
if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
$param = '&id='.$object->id.'&socid='.(!empty($socid) ? '&socid='.$socid : '');
print '<br>';
$param = '&id='.$object->id.(!empty($socid) ? '&socid='.$socid : '');
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage);
}
@ -218,8 +224,8 @@ if ($object->id > 0) {
$param .= '&limit='.urlencode($limit);
}
//print load_fiche_titre($langs->trans("ActionsOnEvaluation"), '', '');
//print load_fiche_titre($langs->trans("ActionsOnMyObject"), '', '');
print_barre_liste($langs->trans("Actions"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1);
// List of all actions
$filters = array();

View File

@ -407,10 +407,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$morehtmlref .= $langs->trans('Label').' : '.$object->label;
$u_position = new User(($db));
$u_position->fetch($object->fk_user);
$morehtmlref .= '<br>'.$langs->trans('Employee').' : '.$u_position->getNomUrl(1);
$morehtmlref .= '<br>'.$u_position->getNomUrl(1);
$job = new Job($db);
$job->fetch($object->fk_job);
$morehtmlref .= '<br>'.$langs->trans('JobPosition').' : '.$job->getNomUrl(1);
$morehtmlref .= '<br>'.$langs->trans('JobProfile').' : '.$job->getNomUrl(1);
$morehtmlref .= '</div>';

View File

@ -142,10 +142,10 @@ if ($object->id) {
$morehtmlref .= $langs->trans('Label').' : '.$object->label;
$u_position = new User(($db));
$u_position->fetch($object->fk_user);
$morehtmlref .= '<br>'.$langs->trans('Employee').' : '.$u_position->getNomUrl(1);
$morehtmlref .= '<br>'.$u_position->getNomUrl(1);
$job = new Job($db);
$job->fetch($object->fk_job);
$morehtmlref .= '<br>'.$langs->trans('JobPosition').' : '.$job->getNomUrl(1);
$morehtmlref .= '<br>'.$langs->trans('JobProfile').' : '.$job->getNomUrl(1);
$morehtmlref .= '</div>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);

View File

@ -135,10 +135,10 @@ if ($object->id) {
$morehtmlref .= $langs->trans('Label').' : '.$object->label;
$u_position = new User(($db));
$u_position->fetch($object->fk_user);
$morehtmlref .= '<br>'.$langs->trans('Employee').' : '.$u_position->getNomUrl(1);
$morehtmlref .= '<br>'.$u_position->getNomUrl(1);
$job = new Job($db);
$job->fetch($object->fk_job);
$morehtmlref .= '<br>'.$langs->trans('JobPosition').' : '.$job->getNomUrl(1);
$morehtmlref .= '<br>'.$langs->trans('JobProfile').' : '.$job->getNomUrl(1);
$morehtmlref .= '</div>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);

View File

@ -110,10 +110,10 @@ if ($id > 0 || !empty($ref)) {
$morehtmlref .= $langs->trans('Label').' : '.$object->label;
$u_position = new User(($db));
$u_position->fetch($object->fk_user);
$morehtmlref .= '<br>'.$langs->trans('Employee').' : '.$u_position->getNomUrl(1);
$morehtmlref .= '<br>'.$u_position->getNomUrl(1);
$job = new Job($db);
$job->fetch($object->fk_job);
$morehtmlref .= '<br>'.$langs->trans('JobPosition').' : '.$job->getNomUrl(1);
$morehtmlref .= '<br>'.$langs->trans('JobProfile').' : '.$job->getNomUrl(1);
$morehtmlref .= '</div>';

View File

@ -208,7 +208,7 @@ $now = dol_now();
//$help_url="EN:Module_Job|FR:Module_Job_FR|ES:Módulo_Job";
$help_url = '';
$title = $langs->trans("JobsPosition");
$title = $langs->trans("JobsProfiles");
$morejs = array();
$morecss = array();

View File

@ -40,7 +40,7 @@ function jobPrepareHead($object)
$head = array();
$head[$h][0] = DOL_URL_ROOT."/hrm/job_card.php?id=".$object->id;
$head[$h][1] = $langs->trans("JobPosition");
$head[$h][1] = $langs->trans("JobProfile");
$head[$h][2] = 'job_card';
$h++;

View File

@ -158,7 +158,7 @@ if ($object->id > 0) {
$morehtmlref .= ($u_position->id > 0 ? $u_position->getNomUrl(1) : $langs->trans('Employee').' : ');
$job = new Job($db);
$job->fetch($object->fk_job);
$morehtmlref .= '<br>'.$langs->trans('JobPosition').' : '.$job->getNomUrl(1);
$morehtmlref .= '<br>'.$langs->trans('JobProfile').' : '.$job->getNomUrl(1);
$morehtmlref .= '</div>';

View File

@ -288,7 +288,7 @@ function displayPositionCard(&$object)
$morehtmlref .= ($u_position->id > 0 ? $u_position->getNomUrl(1) : $langs->trans('Employee').' : ');
$job = new Job($db);
$job->fetch($object->fk_job);
$morehtmlref .= '<br>'.$langs->trans('JobPosition').' : '.$job->getNomUrl(1);
$morehtmlref .= '<br>'.$langs->trans('JobProfile').' : '.$job->getNomUrl(1);
$morehtmlref .= '</div>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref);

View File

@ -136,7 +136,7 @@ if ($object->id) {
$morehtmlref .= ($u_position->id > 0 ? $u_position->getNomUrl(1) : $langs->trans('Employee').' : ');
$job = new Job($db);
$job->fetch($object->fk_job);
$morehtmlref .= '<br>'.$langs->trans('JobPosition').' : '.$job->getNomUrl(1);
$morehtmlref .= '<br>'.$langs->trans('JobProfile').' : '.$job->getNomUrl(1);
$morehtmlref .= '</div>';

View File

@ -109,7 +109,7 @@ if ($id > 0 || !empty($ref)) {
$morehtmlref .= ($u_position->id > 0 ? $u_position->getNomUrl(1) : $langs->trans('Employee').' : ');
$job = new Job($db);
$job->fetch($object->fk_job);
$morehtmlref .= '<br>'.$langs->trans('JobPosition').' : '.$job->getNomUrl(1);
$morehtmlref .= '<br>'.$langs->trans('JobProfile').' : '.$job->getNomUrl(1);
$morehtmlref .= '</div>';

View File

@ -395,3 +395,6 @@ ALTER TABLE llx_opensurvey_user_studs ADD COLUMN date_creation datetime NULL;
ALTER TABLE llx_opensurvey_comments ADD COLUMN date_creation datetime NULL;
ALTER TABLE llx_c_tva ADD COLUMN use_default tinyint DEFAULT 0;
ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN ref varchar(128);
ALTER TABLE llx_facture_fourn_det MODIFY COLUMN ref varchar(128);

View File

@ -26,8 +26,8 @@ HRM_DEFAULT_SKILL_DESCRIPTION=Default description of ranks when skill is created
deplacement=Shift
DateEval=Evaluation date
JobCard=Job card
JobPosition=Job profile
JobsPosition=Job profiles
JobProfile=Job profile
JobsProfiles=Job profiles
NewSkill=New Skill
SkillType=Skill type
Skilldets=List of ranks for this skill
@ -46,14 +46,14 @@ NewEval=New evaluation
ValidateEvaluation=Validate evaluation
ConfirmValidateEvaluation=Are you sure you want to validate this evaluation with reference <b>%s</b>?
EvaluationCard=Evaluation card
RequiredRank=Required rank for this job
RequiredRank=Required rank for the job profile
EmployeeRank=Employee rank for this skill
EmployeePosition=Employee position
EmployeePositions=Employee positions
EmployeesInThisPosition=Employees in this position
group1ToCompare=Usergroup to analyze
group2ToCompare=Second usergroup for comparison
OrJobToCompare=Compare to job skills requirements
OrJobToCompare=Compare to skill requirements of a job profile
difference=Difference
CompetenceAcquiredByOneOrMore=Competence acquired by one or more users but not requested by the second comparator
MaxlevelGreaterThan=Max level greater than the one requested

View File

@ -2910,14 +2910,9 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
if (empty($conf->dol_hide_leftmenu) && (!defined('NOREQUIREMENU') || !constant('NOREQUIREMENU'))) {
// Instantiate hooks for external modules
$hookmanager->initHooks(array('searchform', 'leftblock'));
$hookmanager->initHooks(array('leftblock'));
print "\n".'<!-- Begin side-nav id-left -->'."\n".'<div class="side-nav"><div id="id-left">'."\n";
if ($conf->browser->layout == 'phone') {
$conf->global->MAIN_USE_OLD_SEARCH_FORM = 1; // Select into select2 is awfull on smartphone. TODO Is this still true with select2 v4 ?
}
print "\n";
if (!is_object($form)) {
@ -2925,9 +2920,15 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
}
$selected = -1;
if (empty($conf->global->MAIN_USE_TOP_MENU_SEARCH_DROPDOWN)) {
// Select into select2 is awfull on smartphone. TODO Is this still true with select2 v4 ?
if ($conf->browser->layout == 'phone') {
$conf->global->MAIN_USE_OLD_SEARCH_FORM = 1;
}
$usedbyinclude = 1;
$arrayresult = array();
include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php'; // This set $arrayresult
include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php'; // This make initHooks('searchform') then set $arrayresult
if ($conf->use_javascript_ajax && empty($conf->global->MAIN_USE_OLD_SEARCH_FORM)) {
$searchform .= $form->selectArrayFilter('searchselectcombo', $arrayresult, $selected, '', 1, 0, (empty($conf->global->MAIN_SEARCHBOX_CONTENT_LOADED_BEFORE_KEY) ? 1 : 0), 'vmenusearchselectcombo', 1, $langs->trans("Search"), 1);

View File

@ -276,20 +276,25 @@ if ($object->id > 0) {
//$out.="</a>";
}
$morehtmlright = '';
print '<div class="tabsAction">';
//$messagingUrl = DOL_URL_ROOT.'/societe/messaging.php?socid='.$object->id;
//$morehtmlright .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1);
//$messagingUrl = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id;
//$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2);
if (isModEnabled('agenda')) {
if (!empty($user->rights->agenda->myactions->create) || $user->hasRight('agenda', 'allactions', 'create')) {
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>';
if ($user->hasRight('agenda', 'myactions', 'create') || $user->hasRight('agenda', 'allactions', 'create')) {
$morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out);
} else {
print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AddAction").'</a>';
$morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out, '', 0);
}
}
print '</div>';
if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
print '<br>';
$param = '&id='.$object->id.(!empty($socid) ? '&socid='.$socid : '');
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage);
@ -298,8 +303,8 @@ if ($object->id > 0) {
$param .= '&limit='.urlencode($limit);
}
//print load_fiche_titre($langs->trans("ActionsOnMyObject"), '', '');
print_barre_liste($langs->trans("ActionsOnMyObject"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1);
// List of all actions
$filters = array();

View File

@ -5094,8 +5094,9 @@ class Product extends CommonObject
}
if ($this->status_buy && isset($this->accountancy_code_buy)) {
include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
$buylabel = '';
if (empty($this->status)) {
$buylabel = '<br>';
$buylabel .= '<br>';
}
$buylabel .= '<br><b>'.$langs->trans('ProductAccountancyBuyCode').':</b> '.length_accountg($this->accountancy_code_buy);
$buylabel .= '<br><b>'.$langs->trans('ProductAccountancyBuyIntraCode').':</b> '.length_accountg($this->accountancy_code_buy_intra);

View File

@ -180,7 +180,7 @@ if (!empty($object->id)) {
$morehtmlcenter .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1);
// Show link to change view in agenda
$messagingUrl = DOL_URL_ROOT.'/projet/info.php?id='.$object->id;
$messagingUrl = DOL_URL_ROOT.'/projet/agenda.php?id='.$object->id;
$morehtmlcenter .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2);

View File

@ -1065,7 +1065,8 @@ if ($action == 'create' && $user->rights->projet->creer) {
if (!empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) {
$filteronlist = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST;
}
$text = $form->select_company($object->thirdparty->id, 'socid', $filteronlist, 'None', 1, 0, array(), 0, 'minwidth300');
$text = img_picto('', 'company', 'class="pictofixedwidth"');
$text .= $form->select_company($object->thirdparty->id, 'socid', $filteronlist, 'None', 1, 0, array(), 0, 'minwidth300');
if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile)) {
$texthelp = $langs->trans("IfNeedToUseOtherObjectKeepEmpty");
print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1, 0, '', '', 2);
@ -1618,7 +1619,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
$MAXEVENT = 10;
$morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/projet/info.php?id='.$object->id);
$morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/projet/messaging.php?id='.$object->id);
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';

View File

@ -293,8 +293,8 @@ class Project extends CommonObject
'usage_task' =>array('type'=>'integer', 'label'=>'UsageTasks', 'enabled'=>1, 'visible'=>-1, 'position'=>140),
'usage_organize_event' =>array('type'=>'integer', 'label'=>'UsageOrganizeEvent', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
// Properties for event organization
'date_start_event' =>array('type'=>'date', 'label'=>'DateStartEvent', 'enabled'=>1, 'visible'=>1, 'position'=>200),
'date_end_event' =>array('type'=>'date', 'label'=>'DateEndEvent', 'enabled'=>1, 'visible'=>1, 'position'=>201),
'date_start_event' =>array('type'=>'date', 'label'=>'DateStartEvent', 'enabled'=>"isModEnabled('eventorganization')", 'visible'=>1, 'position'=>200),
'date_end_event' =>array('type'=>'date', 'label'=>'DateEndEvent', 'enabled'=>"isModEnabled('eventorganization')", 'visible'=>1, 'position'=>201),
'location' =>array('type'=>'text', 'label'=>'Location', 'enabled'=>1, 'visible'=>3, 'position'=>55, 'searchall'=>202),
'accept_conference_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestConf', 'enabled'=>1, 'visible'=>-1, 'position'=>210),
'accept_booth_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>211),

View File

@ -152,7 +152,9 @@ $search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int');
$search_date_end_endyear = GETPOST('search_date_end_endyear', 'int');
$search_date_end_endday = GETPOST('search_date_end_endday', 'int');
$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver
$search_category_array = GETPOST("search_category_".Categorie::TYPE_PROJECT."_list", "array");
if (isModEnabled('categorie')) {
$search_category_array = GETPOST("search_category_".Categorie::TYPE_PROJECT."_list", "array");
}
if ($search_status == '') {
$search_status = -1; // -1 or 1
@ -1331,6 +1333,7 @@ while ($i < $imaxinloop) {
$userAccess = $object->restrictedProjectArea($user); // why this ?
if ($userAccess >= 0) {
// Thirdparty
$companystatic->id = $obj->socid;
$companystatic->name = $obj->name;
$companystatic->name_alias = $obj->alias;
@ -1343,6 +1346,21 @@ while ($i < $imaxinloop) {
$companystatic->town = $obj->town;
$companystatic->country_code = $obj->country_code;
// Author
$userstatic->id = $obj->fk_user_creat;
$userstatic->login = $obj->login;
$userstatic->lastname = $obj->lastname;
$userstatic->firstname = $obj->firstname;
$userstatic->email = $obj->user_email;
$userstatic->statut = $obj->user_statut;
$userstatic->entity = $obj->entity;
$userstatic->photo = $obj->photo;
$userstatic->office_phone = $obj->office_phone;
$userstatic->office_fax = $obj->office_fax;
$userstatic->user_mobile = $obj->user_mobile;
$userstatic->job = $obj->job;
$userstatic->gender = $obj->gender;
print '<tr class="oddeven">';
// Action column
@ -1496,12 +1514,25 @@ while ($i < $imaxinloop) {
if (!empty($numcontact)) {
foreach ($tab as $contactproject) {
//var_dump($contacttask);
$cid = $contactproject['id'];
if ($source == 'internal') {
$c = new User($db);
if (empty($conf->cache['user'][$cid])) {
$c = new User($db);
$c->fetch($cid);
$conf->cache['user'][$cid] = $c;
} else {
$c = $conf->cache['user'][$cid];
}
} else {
$c = new Contact($db);
if (empty($conf->cache['contact'][$cid])) {
$c = new Contact($db);
$c->fetch($cid);
$conf->cache['contact'][$cid] = $c;
} else {
$c = $conf->cache['contact'][$cid];
}
}
$c->fetch($contactproject['id']);
if (!empty($c->photo)) {
if (get_class($c) == 'User') {
print $c->getNomUrl(-2, '', 0, 0, 24, 1, '', ($ifisrt ? '' : 'notfirst'));
@ -1703,20 +1734,6 @@ while ($i < $imaxinloop) {
$totalarray['pos'][$totalarray['nbfield']] = 'p.price_booth';
}
}
// Author
$userstatic->id = $obj->fk_user_creat;
$userstatic->login = $obj->login;
$userstatic->lastname = $obj->lastname;
$userstatic->firstname = $obj->firstname;
$userstatic->email = $obj->user_email;
$userstatic->statut = $obj->user_statut;
$userstatic->entity = $obj->entity;
$userstatic->photo = $obj->photo;
$userstatic->office_phone = $obj->office_phone;
$userstatic->office_fax = $obj->office_fax;
$userstatic->user_mobile = $obj->user_mobile;
$userstatic->job = $obj->job;
$userstatic->gender = $obj->gender;
if (!empty($arrayfields['u.login']['checked'])) {
print '<td class="center tdoverflowmax150">';

View File

@ -32,6 +32,8 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
// Load translation files required by the page
$langs->loadLangs(array('agenda', 'bills', 'companies', 'orders', 'propal'));
@ -48,13 +50,6 @@ if (GETPOST('actioncode', 'array')) {
$search_agenda_label = GETPOST('search_agenda_label');
// Security check
$socid = GETPOST('socid', 'int');
if ($user->socid) {
$socid = $user->socid;
}
$result = restrictedArea($user, 'societe', $socid, '&societe');
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
@ -72,9 +67,19 @@ if (!$sortorder) {
$sortorder = 'DESC,DESC';
}
// Initialize technical objects
$object = new Societe($db);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('agendathirdparty'));
// Security check
$socid = GETPOST('socid', 'int');
if ($user->socid) {
$socid = $user->socid;
}
$result = restrictedArea($user, 'societe', $socid, '&societe');
/*
* Actions
@ -109,28 +114,28 @@ if (empty($reshook)) {
$form = new Form($db);
if ($socid > 0) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$object = new Societe($db);
$result = $object->fetch($socid);
$title = $langs->trans("Agenda");
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
$title = $object->name." - ".$title;
}
llxHeader('', $title);
$help_url = '';
llxHeader('', $title, $help_url);
if (isModEnabled('notification')) {
$langs->load("mails");
}
$head = societe_prepare_head($object);
print dol_get_fiche_head($head, 'agenda', $langs->trans("ThirdParty"), -1, 'company');
print dol_get_fiche_head($head, 'agenda', $langs->trans("ThirdParty"), -1, $object->picto);
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom');
$morehtmlref = '';
dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom', $morehtmlref);
print '<div class="fichecenter">';
@ -202,7 +207,7 @@ if ($socid > 0) {
$filters['search_agenda_label'] = $search_agenda_label;
// TODO Replace this with same code than into list.php
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder);
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module);
}
}

View File

@ -253,7 +253,7 @@ class Societe extends CommonObject
'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>-1, 'position'=>270),
'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>440),
'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'Multicurrency code', 'enabled'=>1, 'visible'=>-1, 'position'=>445),
'fk_account' =>array('type'=>'integer', 'label'=>'AccountingAccount', 'enabled'=>1, 'visible'=>-1, 'position'=>450),
'fk_account' =>array('type'=>'integer', 'label'=>'PaymentBankAccount', 'enabled'=>1, 'visible'=>-1, 'position'=>450),
'fk_warehouse' =>array('type'=>'integer', 'label'=>'Warehouse', 'enabled'=>1, 'visible'=>-1, 'position'=>455),
'logo' =>array('type'=>'varchar(255)', 'label'=>'Logo', 'enabled'=>1, 'visible'=>-1, 'position'=>400),
'logo_squarred' =>array('type'=>'varchar(255)', 'label'=>'Logo squarred', 'enabled'=>1, 'visible'=>-1, 'position'=>401),

View File

@ -4907,7 +4907,7 @@ div.titre {
color: var(--colortexttitlenotab2);
}
table.table-fiche-title .col-title div.titre{
table.table-fiche-title .col-title div.titre, .col-right .btnTitle-icon {
line-height: 40px;
}
table.table-fiche-title {
@ -6550,6 +6550,15 @@ ul.select2-results__options li {
direction: rtl;
}
select.multiselectononeline {
padding: 0;
vertical-align: middle;
min-height: unset;
height: 28px !important;
opacity: 0;
/* width: 1px !important; */
}
@media only screen and (min-width: 767px)
{
/* CSS to have the dropdown boxes larger that the input search area */

View File

@ -342,8 +342,8 @@ a.btnTitle.btnTitleSelected {
position: relative;
margin: 0 0 0 10px;
text-align: center;
color: #ffffff;
background-color: rgb(<?php print $colortextlink; ?>);
color: #000;
background-color: #eee;
font-size: 12px;
text-decoration: none;
box-shadow: none;
@ -373,7 +373,10 @@ div.pagination .btnTitle:hover .btnTitle-label{
}
.paginationafterarrows a.btnTitlePlus, .titre_right a.btnTitlePlus {
border: 1px solid var(--colorbackbody);
border: 1px solid var(--btncolorborder);
}
.paginationafterarrows a.btnTitlePlus:hover, .titre_right a.btnTitlePlus:hover {
border-color: #ddd;
}

View File

@ -153,7 +153,7 @@ a.info-box-text-a i.fa.fa-exclamation-triangle {
margin-bottom: 15px;
border: 1px solid #e9e9e9;
}
.info-box.info-box-sm{
.info-box.info-box-sm {
min-height: 80px;
margin-bottom: 10px;
}
@ -213,6 +213,10 @@ a.info-box-text-a i.fa.fa-exclamation-triangle {
font-size: 25px;
line-height: 92px;
}
.info-box-module .info-box-icon {
padding-top: 4px;
padding-bottom: 4px;
}
.opened-dash-board-wrap .info-box .info-box-icon {
font-size: 2em;
}

View File

@ -1806,14 +1806,13 @@ tr.nobottom td {
/* ============================================================================== */
/* Styles to hide objects */
/* ============================================================================== */
.clearboth { clear:both; }
.hideobject { display: none; }
.minwidth25 { min-width: 25px; }
.minwidth50 { min-width: 50px; }
.minwidth75 { min-width: 75px; }
/* rule for not too small screen only */
@media only screen and (min-width: <?php echo round($nbtopmenuentries * $fontsize * 3.4, 0) + 7; ?>px)
@media only screen and (min-width: <?php echo empty($conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px)
{
.width20 { width: 20px; }
.width25 { width: 25px; }
@ -3204,7 +3203,7 @@ a.aversion {
.alogin, .alogin:hover {
color: #888 !important;
font-weight: normal !important;
font-size: <?php echo $fontsizesmaller; ?>px !important;
font-size: <?php echo is_numeric($fontsizesmaller) ? $fontsizesmaller.'px' : $fontsizesmaller; ?> !important;
}
.alogin:hover, .atoplogin:hover {
text-decoration:underline !important;
@ -3305,16 +3304,16 @@ div.vmenu, td.vmenu {
.searchform .bordertransp { border: 0; }
a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active, span.vmenu, span.vsmenu {
white-space: nowrap; font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold;
white-space: nowrap; font-size:<?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize ?>; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold;
}
span.vmenudisabled, font.vmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; color: #aaa; margin-left: 4px; white-space: nowrap; }
span.vmenudisabled, font.vmenudisabled { font-size:<?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize ?>; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; color: #aaa; margin-left: 4px; white-space: nowrap; }
a.vmenu:link, a.vmenu:visited {
color: var(--colortextbackvmenu);
}
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active, span.vsmenu { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #202020; margin: 1px 1px 1px 8px; }
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active, span.vsmenu { font-size:<?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize ?>; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #202020; margin: 1px 1px 1px 8px; }
span.vsmenudisabled:not(.spanlilevel0), font.vsmenudisabled:not(.spanlilevel0) {
font-size:<?php print $fontsize ?>px;
font-size:<?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize ?>;
}
span.vsmenudisabled, font.vsmenudisabled {
font-family: <?php print $fontlist ?>;
@ -4191,9 +4190,6 @@ table.hidepaginationprevious .paginationprevious {
table.hidepaginationnext .paginationnext {
display: none;
}
.paginationafterarrows a.btnTitlePlus {
border: 1px solid var(--btncolorborder);
}
.paginationafterarrows a.btnTitlePlus:hover span:before {
/* text-shadow: 0px 0px 5px #ccc; */
/* filter: invert(0.3); */
@ -4930,7 +4926,7 @@ div.titre {
table.centpercent.notopnoleftnoright.table-fiche-title {
margin-bottom: 10px !important;
}
table.table-fiche-title .col-title div.titre{
table.table-fiche-title .col-title div.titre, .col-right .btnTitle-icon {
line-height: 40px;
}
@ -5029,7 +5025,7 @@ div#card-errors {
.ui-dialog-titlebar {
}
.ui-dialog-content {
font-size: <?php print $fontsize; ?>px !important;
font-size: <?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize; ?> !important;
}
.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-draggable {
z-index: 1002 !important; /* Default 101 with ui-jquery, top menu have a z-index of 1000 */
@ -6449,6 +6445,15 @@ ul.select2-results__options li {
font-size: 0.95em;
}
select.multiselectononeline {
padding: 0;
vertical-align: middle;
min-height: unset;
height: 28px !important;
opacity: 0;
/* width: 1px !important; */
}
@media only screen and (min-width: 767px)
{
/* CSS to have the dropdown boxes larger that the input search area */
@ -7501,13 +7506,12 @@ div.clipboardCPValue.hidewithsize {
width: <?php echo $disableimages ? 'auto' : '44'; ?>px;
}
/* nboftopmenuentries = <?php echo $nbtopmenuentries ?>, fontsize=<?php echo $fontsize ?> */
/* disableimages = <?php echo $disableimages; ?> */
/* rule to reduce top menu - 1st reduction */
@media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 7, 0) + 300; ?>px)
/* nboftopmenuentries = <?php echo $nbtopmenuentries ?>, fontsize=<?php echo is_numeric($fontsize) ? $fontsize.'px' : $fontsize ?> */
/* rule to reduce top menu - 1st reduction: Reduce width of top menu icons */
@media only screen and (max-width: <?php echo empty($conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC1) ? round($nbtopmenuentries * 90, 0) + 340 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC1; ?>px) /* reduction 1 */
{
div.tmenucenter {
max-width: <?php echo round($fontsize * 4); ?>px; /* size of viewport */
max-width: 56px; /* size of viewport */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -7531,16 +7535,16 @@ div.clipboardCPValue.hidewithsize {
display: none;
}
}
/* rule to reduce top menu - 2nd reduction */
@media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 4.5, 0) + 300; ?>px)
/* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */
@media only screen and (max-width: <?php echo empty($conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2) ? round($nbtopmenuentries * 69, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2; ?>px) /* reduction 2 */
{
li.tmenucompanylogo {
display: none;
}
div.tmenucenter {
max-width: <?php echo round($fontsize * 2); ?>px; /* size of viewport */
text-overflow: clip;
max-width: 24px; /* size of viewport */
text-overflow: clip;
}
.mainmenuaspan {
font-size: 10px;

View File

@ -64,8 +64,8 @@ $colortexttitle = '20,20,20';
$colortexttitlelink = '0,0,120';
$colortext = '0,0,0';
$colortextlink = '0,0,120';
$fontsize = '14';
$fontsizesmaller = '11';
$fontsize = '0.94em';
$fontsizesmaller = '0.75em';
$topMenuFontSize = '1.1em';
$toolTipBgColor = 'rgba(255, 255, 255, 0.96)';
$toolTipFontColor = '#333';

View File

@ -136,6 +136,7 @@ $arrayfields = array(
'u.fk_soc'=>array('label'=>"Company", 'checked'=>($contextpage == 'employeelist' ? 0 : 1), 'position'=>45),
'u.ref_employee'=>array('label'=>"RefEmployee", 'checked'=>-1, 'position'=>60, 'enabled'=>(isModEnabled('hrm') && $permissiontoreadhr)),
'u.national_registration_number'=>array('label'=>"NationalRegistrationNumber", 'checked'=>-1, 'position'=>61, 'enabled'=>(isModEnabled('hrm') && $permissiontoreadhr)),
'u.job'=>array('label'=>"PostOrFunction", 'checked'=>-1, 'position'=>50),
'u.salary'=>array('label'=>"Salary", 'checked'=>-1, 'position'=>80, 'enabled'=>(isModEnabled('salaries') && $user->hasRight("salaries", "readall")), 'isameasure'=>1),
'u.datelastlogin'=>array('label'=>"LastConnexion", 'checked'=>1, 'position'=>100),
'u.datepreviouslogin'=>array('label'=>"PreviousConnexion", 'checked'=>0, 'position'=>110),
@ -164,6 +165,7 @@ $search_email = GETPOST('search_email', 'alpha');
$search_api_key = GETPOST('search_api_key', 'alphanohtml');
$search_statut = GETPOST('search_statut', 'intcomma');
$search_thirdparty = GETPOST('search_thirdparty', 'alpha');
$search_job = GETPOST('search_job', 'alpha');
$search_warehouse = GETPOST('search_warehouse', 'alpha');
$search_supervisor = GETPOST('search_supervisor', 'intcomma');
$search_categ = GETPOST("search_categ", 'int');
@ -255,6 +257,7 @@ if (empty($reshook)) {
$search_email = "";
$search_statut = "";
$search_thirdparty = "";
$search_job = "";
$search_warehouse = "";
$search_supervisor = "";
$search_api_key = "";
@ -362,7 +365,7 @@ $morehtmlright = "";
// Build and execute select
// --------------------------------------------------------------------
$sql = "SELECT DISTINCT u.rowid, u.lastname, u.firstname, u.admin, u.fk_soc, u.login, u.office_phone, u.user_mobile, u.email, u.api_key, u.accountancy_code, u.gender, u.employee, u.photo,";
$sql .= " u.ref_employee, u.national_registration_number, u.salary, u.datelastlogin, u.datepreviouslogin,";
$sql .= " u.ref_employee, u.national_registration_number, u.job, u.salary, u.datelastlogin, u.datepreviouslogin,";
$sql .= " u.ldap_sid, u.statut as status, u.entity,";
$sql .= " u.tms as date_update, u.datec as date_creation,";
$sql .= " u2.rowid as id2, u2.login as login2, u2.firstname as firstname2, u2.lastname as lastname2, u2.admin as admin2, u2.fk_soc as fk_soc2, u2.office_phone as ofice_phone2, u2.user_mobile as user_mobile2, u2.email as email2, u2.gender as gender2, u2.photo as photo2, u2.entity as entity2, u2.statut as status2,";
@ -438,6 +441,9 @@ if ($search_email != '') {
if ($search_api_key != '') {
$sql .= natural_search("u.api_key", $search_api_key);
}
if ($search_job != '') {
$sql .= natural_search(array('u.job'), $search_job);
}
if ($search_statut != '' && $search_statut >= 0) {
$sql .= " AND u.statut IN (".$db->sanitize($search_statut).")";
}
@ -784,6 +790,9 @@ if (!empty($arrayfields['u.ref_employee']['checked'])) {
if (!empty($arrayfields['u.national_registration_number']['checked'])) {
print '<td class="liste_titre"></td>';
}
if (!empty($arrayfields['u.job']['checked'])) {
print '<td class="liste_titre"><input type="text" name="search_job" class="maxwidth75" value="'.$search_job.'"></td>';
}
if (!empty($arrayfields['u.salary']['checked'])) {
print '<td class="liste_titre"></td>';
}
@ -835,7 +844,7 @@ if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$totalarray['nbfield']++;
}
if (!empty($arrayfields['u.login']['checked'])) {
print_liste_field_titre("Login", $_SERVER['PHP_SELF'], "u.login", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER['PHP_SELF'], "u.login", $param, "", "", $sortfield, $sortorder);
$totalarray['nbfield']++;
}
if (!empty($arrayfields['u.lastname']['checked'])) {
@ -883,7 +892,11 @@ if (!empty($arrayfields['u.fk_soc']['checked'])) {
$totalarray['nbfield']++;
}
if (!empty($arrayfields['u.entity']['checked'])) {
print_liste_field_titre("Entity", $_SERVER['PHP_SELF'], "u.entity", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre($arrayfields['u.entity']['label'], $_SERVER['PHP_SELF'], "u.entity", $param, "", "", $sortfield, $sortorder);
$totalarray['nbfield']++;
}
if (!empty($arrayfields['u.job']['checked'])) {
print_liste_field_titre($arrayfields['u.job']['label'], $_SERVER['PHP_SELF'], "u.job", $param, "", "", $sortfield, $sortorder);
$totalarray['nbfield']++;
}
if (!empty($arrayfields['u.ref_employee']['checked'])) {
@ -971,6 +984,7 @@ while ($i < $imaxinloop) {
$object->status = $obj->status;
$object->office_phone = $obj->office_phone;
$object->user_mobile = $obj->user_mobile;
$object->job = $obj->job;
$object->email = $obj->email;
$object->gender = $obj->gender;
$object->socid = $obj->fk_soc;
@ -1203,6 +1217,16 @@ while ($i < $imaxinloop) {
$totalarray['nbfield']++;
}
}
// Job position
if (!empty($arrayfields['u.job']['checked'])) {
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->job).'">';
print dol_escape_htmltag($obj->job);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Salary
if (!empty($arrayfields['u.salary']['checked'])) {
print '<td class="nowraponall right amount">';

View File

@ -807,7 +807,7 @@ if ($action == 'addcontainer' && $usercanedit) {
$tmp['content'] = removeHtmlComment($tmp['content']);
// Check there is no PHP content into the imported file (must be only HTML + JS)
$phpcontent = dolKeepOnlyPhpCode('', $tmp['content']);
$phpcontent = dolKeepOnlyPhpCode($tmp['content']);
if ($phpcontent) {
$error++;
setEventMessages('Error getting '.$urltograb.': file that include PHP content is not allowed', null, 'errors');