Merge remote-tracking branch 'uptream/develop' into 6.0-multijournal
This commit is contained in:
commit
dd97bbdc82
@ -84,6 +84,11 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
|
||||
$search_array_options=array();
|
||||
}
|
||||
|
||||
if ($action == 'setMAIN_ENABLE_DEFAULT_VALUES')
|
||||
{
|
||||
if (GETPOST('value')) dolibarr_set_const($db, 'MAIN_ENABLE_DEFAULT_VALUES', 1, 'chaine', 0, '', $conf->entity);
|
||||
else dolibarr_set_const($db, 'MAIN_ENABLE_DEFAULT_VALUES', 0, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
if (($action == 'add' || (GETPOST('add') && $action != 'update')) || GETPOST('actionmodify'))
|
||||
{
|
||||
@ -185,6 +190,23 @@ print load_fiche_titre($langs->trans("DefaultValues"),'','title_setup');
|
||||
print $langs->trans("DefaultValuesDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print $langs->trans("EnableDefaultValues").' ';
|
||||
if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES))
|
||||
{
|
||||
// Button off, click to enable
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&value=1">';
|
||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Button on, click to disable
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&value=0">';
|
||||
print img_picto($langs->trans("Activated"),'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
print "<br><br>\n";
|
||||
|
||||
$param='&mode='.$mode;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
|
||||
@ -330,6 +330,24 @@ if ($mode == 'desc')
|
||||
else $text.=$langs->trans("Disabled");
|
||||
$text.='<br>';
|
||||
|
||||
$tmp = $objMod->getLastActivationInfo();
|
||||
$authorid = $tmp['authorid'];
|
||||
if ($authorid > 0)
|
||||
{
|
||||
$tmpuser = new User($db);
|
||||
$tmpuser->fetch($authorid);
|
||||
$text.='<strong>'.$langs->trans("LastActivationAuthor").':</strong> ';
|
||||
$text.= $tmpuser->getNomUrl(1);
|
||||
$text.='<br>';
|
||||
}
|
||||
$ip = $tmp['ip'];
|
||||
if ($ip)
|
||||
{
|
||||
$text.='<strong>'.$langs->trans("LastActivationIP").':</strong> ';
|
||||
$text.= $ip;
|
||||
$text.='<br>';
|
||||
}
|
||||
|
||||
$moduledesclong=$objMod->getDescLong();
|
||||
if ($moduledesclong) $text.='<br><hr><div class="moduledesclong">'.$moduledesclong.'<div>';
|
||||
}
|
||||
|
||||
@ -402,9 +402,9 @@ if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouM
|
||||
print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'title_setup');
|
||||
|
||||
// Start to show page
|
||||
if ($mode=='common') print $langs->trans("ModulesDesc")."<br>\n";
|
||||
if ($mode=='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."<br>\n";
|
||||
if ($mode=='deploy') print $langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."<br>\n";
|
||||
if ($mode=='common') print '<span class="opacitymedium">'.$langs->trans("ModulesDesc")."</span><br>\n";
|
||||
if ($mode=='marketplace') print '<span class="opacitymedium">'.$langs->trans("ModulesMarketPlaceDesc")."</span><br>\n";
|
||||
if ($mode=='deploy') print '<span class="opacitymedium">'.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."</span><br>\n";
|
||||
|
||||
|
||||
$h = 0;
|
||||
@ -640,7 +640,8 @@ if ($mode == 'common')
|
||||
{
|
||||
$disableSetup = 0;
|
||||
|
||||
print '<td class="center valignmiddle" width="80px">';
|
||||
// Link enable/disabme
|
||||
print '<td class="center valignmiddle" width="60px">';
|
||||
if (! empty($arrayofwarnings[$modName]))
|
||||
{
|
||||
print '<!-- This module has a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
|
||||
@ -662,12 +663,12 @@ if ($mode == 'common')
|
||||
}
|
||||
print '</td>'."\n";
|
||||
|
||||
// Config link
|
||||
// Link config
|
||||
if (! empty($objMod->config_page_url) && !$disableSetup)
|
||||
{
|
||||
if (is_array($objMod->config_page_url))
|
||||
{
|
||||
print '<td class="tdsetuppicto right" width="40px"">';
|
||||
print '<td class="tdsetuppicto right" width="60px">';
|
||||
$i=0;
|
||||
foreach ($objMod->config_page_url as $page)
|
||||
{
|
||||
@ -693,22 +694,23 @@ if ($mode == 'common')
|
||||
}
|
||||
else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs))
|
||||
{
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="80px"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="60px"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="80px"><a href="'.$objMod->config_page_url.'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="60px"><a href="'.$objMod->config_page_url.'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="80px">'.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').'</td>';
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="60px">'.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').'</td>';
|
||||
}
|
||||
|
||||
}
|
||||
else // Module not yet activated
|
||||
{
|
||||
print '<td class="center valignmiddle" width="80px">';
|
||||
// Link enable/disable
|
||||
print '<td class="center valignmiddle" width="60px">';
|
||||
if (! empty($objMod->always_enabled))
|
||||
{
|
||||
// Should never happened
|
||||
@ -754,7 +756,9 @@ if ($mode == 'common')
|
||||
print "</a>\n";
|
||||
}
|
||||
print "</td>\n";
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="80px">'.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').'</td>';
|
||||
|
||||
// Link config
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="60px">'.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').'</td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -149,6 +149,7 @@ if (! empty($conf->productbatch->enabled))
|
||||
//if (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) || ! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT))
|
||||
//{
|
||||
print info_admin($langs->trans("IfYouUsePointOfSaleCheckModule"));
|
||||
print '<br>';
|
||||
//}
|
||||
|
||||
// Title rule for stock decrease
|
||||
@ -433,7 +434,7 @@ if ($virtualdiffersfromphysical)
|
||||
|
||||
|
||||
print '<br />';
|
||||
if ($conf->global->MAIN_LEVEL_FEATURES >= 2)
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
$var=false;
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@ -167,7 +167,7 @@ print load_fiche_titre($langs->trans("UsersSetup"),$linkback,'title_setup');
|
||||
|
||||
$head=user_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head,'card', $langs->trans("MenuUsersAndGroups"), 0, 'user');
|
||||
dol_fiche_head($head,'card', $langs->trans("MenuUsersAndGroups"), -1, 'user');
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -205,7 +205,7 @@ print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
|
||||
|
||||
@ -151,7 +151,7 @@ print load_fiche_titre($langs->trans("UsersSetup"),$linkback,'title_setup');
|
||||
|
||||
$head=user_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head,'usergroupcard', $langs->trans("MenuUsersAndGroups"), 0, 'user');
|
||||
dol_fiche_head($head,'usergroupcard', $langs->trans("MenuUsersAndGroups"), -1, 'user');
|
||||
|
||||
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
|
||||
@ -62,14 +62,15 @@ function printBookmarksList($aDb, $aLangs)
|
||||
*/
|
||||
$ret.= '<div class="menu_top"></div>'."\n";
|
||||
|
||||
$ret.= '<!-- form with GET method --><form id="actionbookmark" name="actionbookmark" method="GET" action="">';
|
||||
$ret.= '<!-- form with POST method by default --><form id="actionbookmark" name="actionbookmark" method="POST" action="">';
|
||||
$ret.= '<select name="bookmark" id="boxbookmark" class="flat boxcombo vmenusearchselectcombo">';
|
||||
$ret.= '<option hidden value="listbookmarks" class="optiongrey" selected rel="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans('Bookmarks').'</option>';
|
||||
$ret.= '<option value="listbookmark" class="optionblue" rel="'.dol_escape_js(DOL_URL_ROOT.'/bookmarks/list.php').'">'.dol_escape_htmltag($user->rights->bookmark->creer ? $langs->trans('EditBookmarks') : $langs->trans('ListOfBookmarks')).'...</option>';
|
||||
$ret.= '<option value="listbookmark" class="optionblue" rel="'.dol_escape_htmltag(DOL_URL_ROOT.'/bookmarks/list.php').'">'.dol_escape_htmltag($user->rights->bookmark->creer ? $langs->trans('EditBookmarks') : $langs->trans('ListOfBookmarks')).'...</option>';
|
||||
// Url to go on create new bookmark page
|
||||
if ($user->rights->bookmark->creer)
|
||||
{
|
||||
$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url);
|
||||
$ret.= '<option value="newbookmark" class="optionblue" rel="'.dol_escape_js($urltoadd).'">'.dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).'...</option>';
|
||||
$ret.= '<option value="newbookmark" class="optionblue" rel="'.dol_escape_htmltag($urltoadd).'">'.dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).'...</option>';
|
||||
}
|
||||
// Menu with all bookmarks
|
||||
if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU))
|
||||
@ -84,7 +85,7 @@ function printBookmarksList($aDb, $aLangs)
|
||||
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && $obj = $db->fetch_object($resql))
|
||||
{
|
||||
//$ret.='<div class="menu_contenu">';
|
||||
$ret.='<option name="bookmark'.$obj->rowid.'" value="'.$obj->rowid.'" '.($obj->target == 1?' target="_blank"':'').' rel="'.dol_escape_js($obj->url).'">'.img_picto('','object_bookmark').' '.$obj->title.'</option>';
|
||||
$ret.='<option name="bookmark'.$obj->rowid.'" value="'.$obj->rowid.'" '.($obj->target == 1?' target="_blank"':'').' rel="'.dol_escape_htmltag($obj->url).'">'.img_picto('','object_bookmark').' '.$obj->title.'</option>';
|
||||
/*$ret.='<a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'"'.($obj->target == 1?' target="_blank"':'').'>';
|
||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $ret.=' '.img_object('','bookmark').' ';
|
||||
$ret.= dol_trunc($obj->title, 20).'</a><br>';*/
|
||||
@ -109,9 +110,19 @@ function printBookmarksList($aDb, $aLangs)
|
||||
var urlselected = jQuery("#boxbookmark option:selected").attr("rel");
|
||||
var urltarget = jQuery("#boxbookmark option:selected").attr("target");
|
||||
if (! urltarget) { urltarget=""; }
|
||||
console.log("We change select bookmark. We choose "+urlselected+" with target "+urltarget);
|
||||
jQuery("form#actionbookmark").attr("target",urltarget);
|
||||
jQuery("form#actionbookmark").attr("action",urlselected);
|
||||
|
||||
console.log("We change select bookmark. We choose urlselected="+urlselected+" with target="+urltarget);
|
||||
|
||||
// Method is POST for internal link, GET for external
|
||||
if (urlselected.startsWith(\'http\'))
|
||||
{
|
||||
var newmethod=\'GET\';
|
||||
jQuery("form#actionbookmark").attr("method",newmethod);
|
||||
console.log("We change method to newmethod="+newmethod);
|
||||
}
|
||||
|
||||
jQuery("#actionbookmark").submit();
|
||||
});';
|
||||
$ret.='})</script>';
|
||||
|
||||
@ -1057,7 +1057,7 @@ else
|
||||
// Print mail content
|
||||
print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto($langs->trans("AvailableVariables"), $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'title_generic');
|
||||
|
||||
dol_fiche_head('');
|
||||
dol_fiche_head('', '', '', -1);
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
@ -4938,25 +4938,33 @@ abstract class CommonObject
|
||||
|
||||
if(!empty($id)) $sql.= ' WHERE rowid = '.$id;
|
||||
else $sql.= ' WHERE ref = \''.$this->quote($ref).'\'';
|
||||
|
||||
|
||||
$res = $this->db->query($sql);
|
||||
if($obj = $this->db->fetch_object($res))
|
||||
if ($res)
|
||||
{
|
||||
$this->id = $id;
|
||||
$this->set_vars_by_db($obj);
|
||||
|
||||
$this->datec = $this->db->idate($obj->datec);
|
||||
$this->tms = $this->db->idate($obj->tms);
|
||||
|
||||
return $this->id;
|
||||
if ($obj = $this->db->fetch_object($res))
|
||||
{
|
||||
$this->id = $id;
|
||||
$this->set_vars_by_db($obj);
|
||||
|
||||
$this->datec = $this->db->idate($obj->datec);
|
||||
$this->tms = $this->db->idate($obj->tms);
|
||||
|
||||
return $this->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->errors[] = $this->error;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->errors[] = $this->error;
|
||||
return -1;
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->errors[] = $this->error;
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -106,14 +106,12 @@ class CoreObject extends CommonObject
|
||||
*/
|
||||
public function fetch($id, $loadChild = true)
|
||||
{
|
||||
|
||||
$res = $this->fetchCommon($id);
|
||||
if($res>0) {
|
||||
if ($loadChild) $this->fetchChild();
|
||||
}
|
||||
|
||||
return $res;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -812,7 +812,7 @@ function activateModule($value,$withdeps=1)
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$result=$objMod->init();
|
||||
$result=$objMod->init(); // Enable module
|
||||
if ($result <= 0)
|
||||
{
|
||||
$ret['errors'][]=$objMod->error;
|
||||
|
||||
@ -260,7 +260,7 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
|
||||
global $conf;
|
||||
|
||||
// Management of default values
|
||||
if (! isset($_GET['sortfield']) && empty($conf->global->MAIN_DISABLE_DEFAULT_VALUES)) // If we did a click on a field to sort, we do no apply default values. Same if option MAIN_DISABLE_DEFAULT_VALUES is on
|
||||
if (! isset($_GET['sortfield']) && ! empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) // If we did a click on a field to sort, we do no apply default values. Same if option MAIN_DISABLE_DEFAULT_VALUES is on
|
||||
{
|
||||
if (! empty($_GET['action']) && $_GET['action'] == 'create' && ! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname]))
|
||||
{
|
||||
|
||||
@ -59,6 +59,11 @@ function user_prepare_head($object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("UserGUISetup");
|
||||
$head[$h][2] = 'guisetup';
|
||||
$h++;
|
||||
|
||||
if ($canreadperms)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$object->id;
|
||||
@ -67,15 +72,27 @@ function user_prepare_head($object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("UserGUISetup");
|
||||
$head[$h][2] = 'guisetup';
|
||||
$h++;
|
||||
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5;
|
||||
$MAXAGENDA=$conf->global->AGENDA_EXT_NB;
|
||||
|
||||
$i=1;
|
||||
$nbagenda = 0;
|
||||
while ($i <= $MAXAGENDA)
|
||||
{
|
||||
$key=$i;
|
||||
$name='AGENDA_EXT_NAME_'.$object->id.'_'.$key;
|
||||
$src='AGENDA_EXT_SRC_'.$object->id.'_'.$key;
|
||||
$offsettz='AGENDA_EXT_OFFSETTZ_'.$object->id.'_'.$key;
|
||||
$color='AGENDA_EXT_COLOR_'.$object->id.'_'.$key;
|
||||
$i++;
|
||||
|
||||
if (! empty($object->conf->$name)) $nbagenda++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/user/agenda_extsites.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("ExtSites");
|
||||
$head[$h][1] = $langs->trans("ExtSites").($nbagenda ? ' <span class="badge">'.$nbagenda.'</span>' : '');
|
||||
$head[$h][2] = 'extsites';
|
||||
$h++;
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
print '<div class="menu_titre" id="menu_titre_logo"></div>';
|
||||
print '<div class="menu_top" id="menu_top_logo"></div>';
|
||||
print '<div class="menu_contenu" id="menu_contenu_logo">';
|
||||
print '<div class="center"><img title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 80%"></div>'."\n";
|
||||
print '<div class="center"><img title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 70%"></div>'."\n";
|
||||
print '</div>';
|
||||
print '<div class="menu_end" id="menu_end_logo"></div>';
|
||||
print '</div>'."\n";
|
||||
|
||||
@ -478,7 +478,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
print '<div class="menu_titre" id="menu_titre_logo"></div>';
|
||||
print '<div class="menu_top" id="menu_top_logo"></div>';
|
||||
print '<div class="menu_contenu" id="menu_contenu_logo">';
|
||||
print '<div class="center"><img class="mycompany" title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 80%"></div>'."\n";
|
||||
print '<div class="center"><img class="mycompany" title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 70%"></div>'."\n";
|
||||
print '</div>';
|
||||
print '<div class="menu_end" id="menu_end_logo"></div>';
|
||||
print '</div>'."\n";
|
||||
@ -1265,7 +1265,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
}
|
||||
|
||||
// Inventory
|
||||
if ($conf->global->MAIN_LEVEL_FEATURES >= 2)
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
|
||||
@ -795,6 +795,37 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gives the last author of activation
|
||||
*
|
||||
* @return array Array array('authorid'=>Id of last activation user, 'lastactivationdate'=>Date of last activation)
|
||||
*/
|
||||
function getLastActivationInfo()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT tms, note FROM ".MAIN_DB_PREFIX."const";
|
||||
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->const_name."'";
|
||||
$sql.= " AND entity IN (0, ".$conf->entity.")";
|
||||
|
||||
dol_syslog(get_class($this)."::getLastActiveDate", LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
if (! $resql) $err++;
|
||||
else
|
||||
{
|
||||
$obj=$this->db->fetch_object($resql);
|
||||
$tmp=array();
|
||||
if ($obj->note)
|
||||
{
|
||||
$tmp=json_decode($obj->note, true);
|
||||
}
|
||||
if ($obj) return array('authorid'=>$tmp['authorid'], 'ip'=>$tmp['ip'], 'lastactivationdate'=>$this->db->jdate($obj->tms));
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Insert constants for module activation
|
||||
*
|
||||
@ -802,7 +833,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
*/
|
||||
function _active()
|
||||
{
|
||||
global $conf;
|
||||
global $conf, $user;
|
||||
|
||||
$err = 0;
|
||||
|
||||
@ -817,10 +848,13 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
$resql=$this->db->query($sql);
|
||||
if (! $resql) $err++;
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible,entity) VALUES";
|
||||
$note=json_encode(array('authorid'=>$user->id, 'ip'=>$_SERVER['REMOTE_ADDR']));
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name, value, visible, entity, note) VALUES";
|
||||
$sql.= " (".$this->db->encrypt($this->const_name,1);
|
||||
$sql.= ",".$this->db->encrypt('1',1);
|
||||
$sql.= ",0,".$entity.")";
|
||||
$sql.= ", ".$this->db->encrypt('1',1);
|
||||
$sql.= ", 0, ".$entity;
|
||||
$sql.= ", '".$this->db->escape($note)."')";
|
||||
|
||||
dol_syslog(get_class($this)."::_active", LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
|
||||
@ -117,32 +117,37 @@ class modStock extends DolibarrModules
|
||||
$this->rights[4][4] = 'mouvement';
|
||||
$this->rights[4][5] = 'creer';
|
||||
|
||||
if ($conf->global->MAIN_LEVEL_FEATURES >= 2) {
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
|
||||
$this->rights[5][0] = 1006;
|
||||
$this->rights[5][0] = 1011;
|
||||
$this->rights[5][1] = 'inventoryReadPermission'; // Permission label
|
||||
$this->rights[5][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[5][4] = 'read'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[5][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[5][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[6][0] = 1007;
|
||||
$this->rights[6][0] = 1012;
|
||||
$this->rights[6][1] = 'inventoryCreatePermission'; // Permission label
|
||||
$this->rights[6][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[6][4] = 'create'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[6][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[6][5] = 'create'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[7][0] = 1008;
|
||||
$this->rights[7][0] = 1013;
|
||||
$this->rights[7][1] = 'inventoryWritePermission'; // Permission label
|
||||
$this->rights[7][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[7][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[7][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[7][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[7][0] = 1009;
|
||||
$this->rights[7][1] = 'inventoryValidatePermission'; // Permission label
|
||||
$this->rights[7][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[7][4] = 'validate'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[8][0] = 1014;
|
||||
$this->rights[8][1] = 'inventoryValidatePermission'; // Permission label
|
||||
$this->rights[8][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[8][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[8][5] = 'validate'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[7][0] = 1010;
|
||||
$this->rights[7][1] = 'inventoryChangePMPPermission'; // Permission label
|
||||
$this->rights[7][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[7][4] = 'changePMP'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[9][0] = 1015;
|
||||
$this->rights[9][1] = 'inventoryChangePMPPermission'; // Permission label
|
||||
$this->rights[9][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[9][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[9][5] = 'changePMP'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -258,7 +258,7 @@ if (!empty($conf->global->MAIN_EASTER_EGG_COMMITSTRIP)) {
|
||||
<?php if ($main_home)
|
||||
{
|
||||
?>
|
||||
<div class="center login_main_home" style="max-width: 80%">
|
||||
<div class="center login_main_home" style="max-width: 70%">
|
||||
<?php echo $main_home; ?>
|
||||
</div><br>
|
||||
<?php
|
||||
|
||||
@ -151,7 +151,7 @@ if (! empty($hookmanager->resArray['options'])) {
|
||||
</form>
|
||||
|
||||
|
||||
<div class="center login_main_home" style="max-width: 80%">
|
||||
<div class="center login_main_home" style="max-width: 70%">
|
||||
<?php if ($mode == 'dolibarr' || ! $disabled) { ?>
|
||||
<font style="font-size: 12px;">
|
||||
<?php echo $langs->trans('SendNewPasswordDesc'); ?>
|
||||
|
||||
@ -202,7 +202,7 @@ $user_id = $user->id;
|
||||
if ($id > 0)
|
||||
{
|
||||
// Charge utilisateur edite
|
||||
$fuser->fetch($id);
|
||||
$fuser->fetch($id, '', '', 1);
|
||||
$fuser->getrights();
|
||||
$user_id = $fuser->id;
|
||||
}
|
||||
|
||||
@ -43,5 +43,4 @@ create table llx_fichinter
|
||||
note_public text,
|
||||
model_pdf varchar(255),
|
||||
extraparams varchar(255) -- for stock other parameters with json format
|
||||
|
||||
)ENGINE=innodb;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
||||
-- Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@ -19,13 +19,18 @@
|
||||
|
||||
CREATE TABLE llx_inventory
|
||||
(
|
||||
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
datec datetime DEFAULT NULL,
|
||||
tms timestamp,
|
||||
fk_warehouse integer DEFAULT 0,
|
||||
entity integer DEFAULT 0,
|
||||
status integer DEFAULT 0,
|
||||
title varchar(255) NOT NULL,
|
||||
date_inventory datetime DEFAULT NULL
|
||||
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 0,
|
||||
ref varchar(48),
|
||||
datec datetime DEFAULT NULL,
|
||||
tms timestamp,
|
||||
fk_user_author integer, -- user making creation
|
||||
fk_user_modif integer, -- user making last change
|
||||
fk_user_valid integer, -- valideur de la fiche
|
||||
fk_warehouse integer DEFAULT 0,
|
||||
status integer DEFAULT 0,
|
||||
title varchar(255) NOT NULL,
|
||||
date_inventory datetime DEFAULT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
)
|
||||
ENGINE=InnoDB;
|
||||
|
||||
@ -302,6 +302,8 @@ CurrentVersion=Dolibarr current version
|
||||
CallUpdatePage=Go to the page that updates the database structure and data: %s.
|
||||
LastStableVersion=Latest stable version
|
||||
LastActivationDate=Latest activation date
|
||||
LastActivationAuthor=Latest activation author
|
||||
LastActivationIP=Latest activation IP
|
||||
UpdateServerOffline=Update server offline
|
||||
WithCounter=Manage a counter
|
||||
GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:<br><b>{000000}</b> corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> same as previous but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br>
|
||||
@ -431,6 +433,7 @@ TheKeyIsTheNameOfHtmlField=This is the name of the HTML field. This need to have
|
||||
PageUrlForDefaultValues=You must enter here the relative url of the page. If you include parameters in URL, the default values will be effective if all parameters are set to same value. Examples:
|
||||
PageUrlForDefaultValuesCreate=<br>For form to create a new thirdparty, it is <strong>%s</strong>
|
||||
PageUrlForDefaultValuesList=<br>For page that list thirdparties, it is <strong>%s</strong>
|
||||
EnableDefaultValues=Enable usage of personalized default values
|
||||
GoIntoTranslationMenuToChangeThis=A translation has been found for the key with this code, so to change this value, you must edit it fom Home-Setup-translation.
|
||||
WarningSettingSortOrder=Warning, setting a default sort order may result in a technical error when going on the list page if field is an unknown field. If you experience such an error, come back to this page to remove the default sort order and restore default behavior.
|
||||
Field=Field
|
||||
@ -1098,7 +1101,7 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo
|
||||
NewTranslationStringToShow=New translation string to show
|
||||
OriginalValueWas=The original translation is overwritten. Original value was:<br><br>%s
|
||||
TransKeyWithoutOriginalValue=You forced a new translation for the translation key '<strong>%s</strong>' that does not exists in any language files
|
||||
TotalNumberOfActivatedModules=Total number of activated feature modules: <b>%s</b> / <b>%s</b>
|
||||
TotalNumberOfActivatedModules=Activated feature/modules: <b>%s</b> / <b>%s</b>
|
||||
YouMustEnableOneModule=You must at least enable 1 module
|
||||
ClassNotFoundIntoPathWarning=Class %s not found into PHP path
|
||||
YesInSummer=Yes in summer
|
||||
|
||||
@ -361,9 +361,9 @@ if ($action == 'create')
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('inventoryConfirmCreate').'" />';
|
||||
print '<input type="submit" class="button" name="create" value="'.$langs->trans('inventoryConfirmCreate').'" />';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('inventoryConfirmCreate').'" />';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans('Cancel').'" />';
|
||||
print '</div>';
|
||||
|
||||
echo '</form>';
|
||||
@ -373,8 +373,14 @@ if ($action == 'create')
|
||||
if ($action == 'view' || $action == 'edit' || empty($action))
|
||||
{
|
||||
$object = new Inventory($db);
|
||||
$object->fetch($id);
|
||||
|
||||
$result = $object->fetch($id);
|
||||
if ($result < 0) dol_print_error($db, $object->error, $object->errors);
|
||||
|
||||
$warehouse = new Entrepot($db);
|
||||
$warehouse->fetch($object->fk_warehouse);
|
||||
|
||||
|
||||
|
||||
if($action == 'changePMP')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ApplyNewPMP'), $langs->trans('ConfirmApplyNewPMP', $object->getTitle()), 'confirm_changePMP', array(),'no',1);
|
||||
@ -396,18 +402,17 @@ if ($action == 'view' || $action == 'edit' || empty($action))
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('RegulateStock'),$langs->trans('ConfirmRegulateStock',$object->getTitle()),'confirm_regulate',array(),'no',1);
|
||||
}
|
||||
|
||||
$warehouse = new Entrepot($db);
|
||||
$warehouse->fetch($object->fk_warehouse);
|
||||
|
||||
print dol_get_fiche_head(inventoryPrepareHead($object, $langs->trans('inventoryOfWarehouse', $warehouse->libelle), empty($action) ? '': '&action='.$action));
|
||||
|
||||
$lines = array();
|
||||
card_line($object, $lines, $action);
|
||||
|
||||
print '<b>'.$langs->trans('inventoryOnDate')." ".$object->getDate('date_inventory').'</b><br><br>';
|
||||
print $langs->trans('Ref')." ".$object->ref.'<br>';
|
||||
print $langs->trans('Date')." ".$object->getDate('date_inventory').'<br><br>';
|
||||
|
||||
$objectTPL = array(
|
||||
'id'=> $object->id
|
||||
'id'=> $object->id
|
||||
,'ref'=> $object->ref
|
||||
,'date_cre' => $object->getDate('date_cre', 'd/m/Y')
|
||||
,'date_maj' => $object->getDate('date_maj', 'd/m/Y H:i')
|
||||
,'fk_warehouse' => $object->fk_warehouse
|
||||
@ -608,8 +613,8 @@ function _headerList($view)
|
||||
|
||||
?>
|
||||
<tr style="background-color:#dedede;">
|
||||
<th align="left" width="20%"> Produit</th>
|
||||
<th align="center"><?php echo $langs->trans('Warehouse'); ?></th>
|
||||
<th class="titlefield"><?php echo $langs->trans('Product'); ?></th>
|
||||
<th><?php echo $langs->trans('Warehouse'); ?></th>
|
||||
<?php if (! empty($conf->barcode->enabled)) { ?>
|
||||
<th align="center"><?php echo $langs->trans('Barcode'); ?></th>
|
||||
<?php } ?>
|
||||
|
||||
@ -69,6 +69,7 @@ class Inventory extends CoreObject
|
||||
*/
|
||||
protected $fields=array(
|
||||
'fk_warehouse'=>array('type'=>'integer','index'=>true)
|
||||
,'ref'=>array('type'=>'string','index'=>true)
|
||||
,'entity'=>array('type'=>'integer','index'=>true)
|
||||
,'status'=>array('type'=>'integer','index'=>true)
|
||||
,'date_inventory'=>array('type'=>'date')
|
||||
@ -113,7 +114,8 @@ class Inventory extends CoreObject
|
||||
if(!$loadChild) $this->withChild = false;
|
||||
|
||||
$res = parent::fetch($id, $loadChild);
|
||||
if($res > 0)
|
||||
|
||||
if ($res > 0)
|
||||
{
|
||||
$this->sortDet();
|
||||
$this->amount = 0;
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
<?php echo inventorySelectProducts($object); ?>
|
||||
|
||||
<input class="button" type="submit" value="<?php echo $langs->trans('AddProduct'); ?>" />
|
||||
</form>
|
||||
</form><br>
|
||||
<?php } ?>
|
||||
|
||||
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
|
||||
@ -92,7 +92,7 @@
|
||||
<input type="hidden" name="action" value="save" />
|
||||
<input type="hidden" name="id" value="<?php echo $object->id; ?>" />
|
||||
|
||||
<table width="100%" class="border workstation">
|
||||
<table width="100%" class="noborder workstation">
|
||||
<?php
|
||||
|
||||
_headerList($view);
|
||||
|
||||
@ -277,16 +277,14 @@ if ($action == 'edit')
|
||||
}
|
||||
else if ($action != 'add')
|
||||
{
|
||||
//if ($cnt_trans) print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
if (! empty($object->multilangs))
|
||||
{
|
||||
foreach ($object->multilangs as $key => $value)
|
||||
{
|
||||
$s=picto_from_langcode($key);
|
||||
//print '<tr><td>';
|
||||
print ($s?$s.' ':'')." <b>".$langs->trans('Language_'.$key).":</b> ".'<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&langtodelete='.$key.'">'.img_delete('', 'class="valigntextbottom"').'</a>';
|
||||
//print '</td><td></td></tr>';
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans('Label').'</td><td>'.$object->multilangs[$key]["label"].'</td></tr>';
|
||||
@ -296,6 +294,7 @@ else if ($action != 'add')
|
||||
print '<tr><td>'.$langs->trans('Other').' ('.$langs->trans("NotUsed").')</td><td>'.$object->multilangs[$key]["other"].'</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
if (! $cnt_trans && $action != 'add') print '<div class="opacitymedium">'. $langs->trans('NoTranslation').'</div>';
|
||||
|
||||
@ -70,7 +70,7 @@ print load_fiche_titre($langs->trans("CompanySetup"),$linkback,'title_setup');
|
||||
|
||||
$head = societe_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes_contacts', $langs->trans("ThirdParties"), 0, 'company');
|
||||
dol_fiche_head($head, 'attributes_contacts', $langs->trans("ThirdParties"), -1, 'company');
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
|
||||
@ -307,7 +307,7 @@ print load_fiche_titre($langs->trans("CompanySetup"),$linkback,'title_setup');
|
||||
|
||||
$head = societe_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("ThirdParties"), 0, 'company');
|
||||
dol_fiche_head($head, 'general', $langs->trans("ThirdParties"), -1, 'company');
|
||||
|
||||
$dirsociete=array_merge(array('/core/modules/societe/'),$conf->modules_parts['societe']);
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ print load_fiche_titre($langs->trans("CompanySetup"),$linkback,'title_setup');
|
||||
|
||||
$head = societe_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("ThirdParties"), 0, 'company');
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("ThirdParties"), -1, 'company');
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
|
||||
BIN
htdocs/theme/dolibarr_logo.png
Normal file → Executable file
BIN
htdocs/theme/dolibarr_logo.png
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 10 KiB |
@ -28,7 +28,7 @@
|
||||
|
||||
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
|
||||
$theme_bordercolor = array(235,235,224);
|
||||
$theme_datacolor = array(array(136,102,136), array(140,140,220), array(190,120,120), array(0,160,140), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150));
|
||||
$theme_datacolor = array(array(136,102,136), array(0,130,110), array(140,140,220), array(190,120,120), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150));
|
||||
$theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4'));
|
||||
$theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC'));
|
||||
|
||||
|
||||
@ -90,10 +90,10 @@ $colorbacklinepair1='248,248,248'; // line pair
|
||||
$colorbacklinepair2='248,248,248'; // line pair
|
||||
$colorbacklinepairhover='238,246,252'; // line pair
|
||||
$colorbackbody='255,255,255';
|
||||
$colortexttitlenotab='60,60,20';
|
||||
$colortexttitlenotab='100,60,20';
|
||||
$colortexttitle='0,0,0';
|
||||
$colortext='0,0,0';
|
||||
$colortextlink='0,0,120';
|
||||
$colortextlink='0,0,100';
|
||||
$fontsize='13';
|
||||
$fontsizesmaller='12';
|
||||
$useboldtitle=(isset($conf->global->THEME_ELDY_USEBOLDTITLE)?$conf->global->THEME_ELDY_USEBOLDTITLE:1);
|
||||
@ -988,6 +988,9 @@ div.fiche {
|
||||
<?php if (! empty($conf->dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'."\n"; ?>
|
||||
<?php if (! empty($conf->dol_hide_leftmenu)) print 'margin-bottom: 12px;'."\n"; ?>
|
||||
}
|
||||
div.fiche>table:first-child {
|
||||
margin-bottom: 15px !important;
|
||||
}
|
||||
div.fichecenter {
|
||||
/* margin-top: 10px; */
|
||||
width: 100%;
|
||||
@ -2018,6 +2021,9 @@ a.tabTitle {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
a.tabunactive {
|
||||
color: rgb(<?php print $colortextlink; ?>) !important;
|
||||
}
|
||||
a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
padding: 12px 9px 12px;
|
||||
@ -2942,15 +2948,15 @@ div.error {
|
||||
|
||||
/* Info admin */
|
||||
div.info {
|
||||
color: #303035;
|
||||
color: #fff;
|
||||
padding: 0.4em 0.4em 0.4em 0.4em;
|
||||
margin: 0.5em 0em 0.5em 0em;
|
||||
border: 1px solid #e0e0e0;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
background: #EaE4Ea;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
background: #806090;
|
||||
/* text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); */
|
||||
}
|
||||
|
||||
div.warning a, div.info a, div.error a {
|
||||
@ -3034,7 +3040,7 @@ td.legendLabel { padding: 2px 2px 2px 0 !important; }
|
||||
div.titre {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-size: 14px;
|
||||
/* font-weight: bold; */
|
||||
font-weight: bold;
|
||||
color: rgb(<?php print $colortexttitlenotab; ?>);
|
||||
text-decoration: none;
|
||||
padding-top: 5px;
|
||||
|
||||
@ -71,7 +71,7 @@ print load_fiche_titre($langs->trans("UsersSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = user_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes_group', $langs->trans("MenuUsersAndGroups"), 0, 'user');
|
||||
dol_fiche_head($head, 'attributes_group', $langs->trans("MenuUsersAndGroups"), -1, 'user');
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ print load_fiche_titre($langs->trans("UsersSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = user_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("MenuUsersAndGroups"), 0, 'user');
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("MenuUsersAndGroups"), -1, 'user');
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ $actiontest=GETPOST('test','alpha');
|
||||
$actionsave=GETPOST('save','alpha');
|
||||
|
||||
if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5;
|
||||
$MAXAGENDA=empty($conf->global->AGENDA_EXT_NB)?5:$conf->global->AGENDA_EXT_NB;
|
||||
$MAXAGENDA=$conf->global->AGENDA_EXT_NB;
|
||||
|
||||
// List of available colors
|
||||
$colorlist=array('BECEDD','DDBECE','BFDDBE','F598B4','F68654','CBF654','A4A4A5');
|
||||
@ -50,7 +50,8 @@ $colorlist=array('BECEDD','DDBECE','BFDDBE','F598B4','F68654','CBF654','A4A4A5')
|
||||
// Security check
|
||||
$id = GETPOST('id','int');
|
||||
$object = new User($db);
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, '', '', 1);
|
||||
$object->getrights();
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
@ -81,12 +82,12 @@ if (empty($reshook)) {
|
||||
if ($actionsave) {
|
||||
$db->begin();
|
||||
|
||||
$i = 1;
|
||||
$errorsaved = 0;
|
||||
$error = 0;
|
||||
$tabparam = array();
|
||||
|
||||
// Save agendas
|
||||
$i = 1;
|
||||
while ($i <= $MAXAGENDA) {
|
||||
$name = trim(GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$i, 'alpha'));
|
||||
$src = trim(GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$i, 'alpha'));
|
||||
@ -110,7 +111,7 @@ if (empty($reshook)) {
|
||||
$tabparam['AGENDA_EXT_COLOR_'.$id.'_'.$i]=$color;
|
||||
$tabparam['AGENDA_EXT_ENABLED_'.$id.'_'.$i]=$enabled;
|
||||
|
||||
$i ++;
|
||||
$i++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
@ -167,7 +168,6 @@ print "<br>\n";
|
||||
$selectedvalue=$conf->global->AGENDA_DISABLE_EXT;
|
||||
if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1;
|
||||
|
||||
$var=true;
|
||||
print '<div class="div-table-responsive">';
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
|
||||
@ -180,7 +180,6 @@ print '<td align="right">'.$langs->trans("Color").'</td>';
|
||||
print "</tr>";
|
||||
|
||||
$i=1;
|
||||
$var=true;
|
||||
while ($i <= $MAXAGENDA)
|
||||
{
|
||||
$key=$i;
|
||||
@ -189,7 +188,7 @@ while ($i <= $MAXAGENDA)
|
||||
$offsettz='AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key;
|
||||
$color='AGENDA_EXT_COLOR_'.$id.'_'.$key;
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
// Nb
|
||||
print '<td class="maxwidth50onsmartphone">'.$langs->trans("AgendaExtNb",$key)."</td>";
|
||||
|
||||
@ -50,7 +50,8 @@ $result = restrictedArea($user, 'user', $id, 'user&user', $feature2);
|
||||
$object = new User($db);
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$result = $object->fetch($id, $ref);
|
||||
$result = $object->fetch($id, $ref, '', 1);
|
||||
$object->getrights();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -1140,7 +1140,7 @@ else
|
||||
|
||||
if ($id > 0)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, '', '', 1);
|
||||
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||
|
||||
|
||||
@ -83,7 +83,8 @@ llxHeader("","ClickToDial");
|
||||
if ($id > 0)
|
||||
{
|
||||
$object = new User($db);
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, '', '', 1);
|
||||
$object->getrights();
|
||||
$object->fetch_clicktodial();
|
||||
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ if (! $sortfield) $sortfield="name";
|
||||
$object = new User($db);
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$result = $object->fetch($id, $ref);
|
||||
$result = $object->fetch($id, $ref, '', 1);
|
||||
$object->getrights();
|
||||
$entitytouseforuserdir = $object->entity;
|
||||
if (empty($entitytouseforuserdir)) $entitytouseforuserdir=1;
|
||||
|
||||
@ -34,7 +34,7 @@ $id = GETPOST('id','int');
|
||||
$object = new User($db);
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$result = $object->fetch($id, $ref);
|
||||
$result = $object->fetch($id, $ref, '', 1);
|
||||
$object->getrights();
|
||||
}
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ if ($user->id == $id) $feature2=''; // A user can always read its own card
|
||||
$result = restrictedArea($user, 'user', $id, 'user&user', $feature2);
|
||||
|
||||
$object = new User($db);
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, '', '', 1);
|
||||
$object->getrights();
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
|
||||
@ -36,7 +36,7 @@ $langs->load("bills");
|
||||
$langs->load("users");
|
||||
|
||||
$object = new User($db);
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, '', '', 1);
|
||||
$object->getrights();
|
||||
|
||||
// If user is not user read and no permission to read other users, we stop
|
||||
@ -53,9 +53,9 @@ $result = restrictedArea($user, 'user', $id, 'user&user', $feature2);
|
||||
$hookmanager->initHooks(array('usercard','globalcard'));
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Actions */
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters=array('id'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
@ -76,9 +76,9 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Affichage fiche */
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
@ -122,7 +122,8 @@ if ($action == 'delete')
|
||||
$form = new Form($db);
|
||||
|
||||
$object = new User($db);
|
||||
$result=$object->fetch($id);
|
||||
$result=$object->fetch($id, '', '', 1);
|
||||
$object->getrights();
|
||||
|
||||
$title=$langs->trans("ThirdParty").' - '.$langs->trans("Notification");
|
||||
if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Notification");
|
||||
|
||||
@ -68,7 +68,7 @@ $result = restrictedArea($user, 'user', $id, 'user&user', $feature2);
|
||||
if ($user->id <> $id && ! $canreaduser) accessforbidden();
|
||||
|
||||
$object = new User($db);
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, '', '', 1);
|
||||
$object->getrights();
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
|
||||
Loading…
Reference in New Issue
Block a user