Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
6f8b403c23
@ -814,10 +814,10 @@ class FormOther
|
||||
foreach($boxactivated as $box) $arrayboxactivatedid[$box->id]=$box->id;
|
||||
|
||||
$selectboxlist='';
|
||||
if ($conf->use_javascript_ajax)
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
$emptyuser=new User($db);
|
||||
$boxavailable=InfoBox::listboxes($db,'activated',$areacode,$emptyuser,$arrayboxactivatedid); // Available here is activated for empty user
|
||||
$boxavailable=InfoBox::listboxes($db,'activated',$areacode,$emptyuser,$arrayboxactivatedid); // Get list of box available for empty user (minus already activated for user)
|
||||
|
||||
$arrayboxtoactivatelabel=array();
|
||||
foreach($boxavailable as $box)
|
||||
@ -852,9 +852,11 @@ class FormOther
|
||||
</script>';
|
||||
}
|
||||
|
||||
print load_fiche_titre((count($boxactivated)?$langs->trans("OtherInformationsBoxes"):''),$selectboxlist,'','','otherboxes');
|
||||
$nbboxactivated=count($boxactivated);
|
||||
|
||||
if (count($boxactivated))
|
||||
print load_fiche_titre(($nbboxactivated?$langs->trans("OtherInformationsBoxes"):''),$selectboxlist,'','','otherboxes');
|
||||
|
||||
if ($nbboxactivated)
|
||||
{
|
||||
print '<table width="100%" class="notopnoleftnoright">';
|
||||
print '<tr><td class="notopnoleftnoright">'."\n";
|
||||
@ -871,7 +873,8 @@ class FormOther
|
||||
$ii=0;
|
||||
foreach ($boxactivated as $key => $box)
|
||||
{
|
||||
if (preg_match('/^A/i',$box->box_order)) // column A
|
||||
if (empty($box->box_order) && $ii < ($nbboxactivated / 2)) $box->box_order='A'.sprintf("%02d",($ii+1)); // When box_order was not yet set to Axx or Bxx and is still 0
|
||||
if (preg_match('/^A/i',$box->box_order)) // column A
|
||||
{
|
||||
$ii++;
|
||||
//print 'box_id '.$boxactivated[$ii]->box_id.' ';
|
||||
@ -899,7 +902,8 @@ class FormOther
|
||||
$ii=0;
|
||||
foreach ($boxactivated as $key => $box)
|
||||
{
|
||||
if (preg_match('/^B/i',$box->box_order)) // colonne B
|
||||
if (empty($box->box_order) && $ii < ($nbboxactivated / 2)) $box->box_order='B'.sprintf("%02d",($ii+1)); // When box_order was not yet set to Axx or Bxx and is still 0
|
||||
if (preg_match('/^B/i',$box->box_order)) // colonne B
|
||||
{
|
||||
$ii++;
|
||||
//print 'box_id '.$boxactivated[$ii]->box_id.' ';
|
||||
|
||||
@ -37,7 +37,7 @@ class InfoBox
|
||||
* @param array $excludelist Array of box id (box.box_id = boxes_def.rowid) to exclude
|
||||
* @return array Array of boxes
|
||||
*/
|
||||
static function listBoxes($db, $mode,$zone,$user,$excludelist=array())
|
||||
static function listBoxes($db, $mode, $zone, $user, $excludelist=array())
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@ -52,7 +52,7 @@ class InfoBox
|
||||
$sql.= " WHERE b.box_id = d.rowid";
|
||||
$sql.= " AND d.entity = ".$conf->entity;
|
||||
if ($zone >= 0) $sql.= " AND b.position = ".$zone;
|
||||
if ($user->id && $user->conf->$confuserzone) $sql.= " AND b.fk_user = ".$user->id;
|
||||
if ($user->id && ! empty($user->conf->$confuserzone)) $sql.= " AND b.fk_user = ".$user->id;
|
||||
else $sql.= " AND b.fk_user = 0";
|
||||
$sql.= " ORDER BY b.box_order";
|
||||
}
|
||||
@ -99,7 +99,7 @@ class InfoBox
|
||||
$box->box_order = (! empty($obj->box_order) ? $obj->box_order : '');
|
||||
$box->fk_user = (! empty($obj->fk_user) ? $obj->fk_user : '');
|
||||
$box->sourcefile=$relsourcefile;
|
||||
if ($mode == 'activated' && (! $user->id || ! $user->conf->$confuserzone))
|
||||
if ($mode == 'activated' && (! $user->id || empty($user->conf->$confuserzone))) // List of activated box was not yet personalized into database
|
||||
{
|
||||
if (is_numeric($box->box_order))
|
||||
{
|
||||
|
||||
@ -24,8 +24,9 @@
|
||||
* \brief File that defines the balance of paid holiday of users.
|
||||
*/
|
||||
|
||||
include 'common.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT. '/user/class/user.class.php';
|
||||
require('../main.inc.php');
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||
|
||||
// Protection if external user
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
@ -22,12 +22,13 @@
|
||||
* \brief Form and file creation of paid holiday.
|
||||
*/
|
||||
|
||||
include 'common.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT. '/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT. '/user/class/usergroup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT. '/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT. '/core/class/CMailFile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT. '/core/class/html.formmail.class.php';
|
||||
require('../main.inc.php');
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||
|
||||
// Get parameters
|
||||
$myparam = GETPOST("myparam");
|
||||
|
||||
@ -23,11 +23,12 @@
|
||||
* \brief List of holiday.
|
||||
*/
|
||||
|
||||
include 'common.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT. '/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT. '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT. '/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT. '/user/class/usergroup.class.php';
|
||||
require('../main.inc.php');
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||
|
||||
// Protection if external user
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
@ -22,10 +22,11 @@
|
||||
* \brief Monthly report of paid holiday.
|
||||
*/
|
||||
|
||||
include 'common.inc.php';
|
||||
require('../main.inc.php');
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||
|
||||
// Protection if external user
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
@ -23,8 +23,9 @@
|
||||
* \ingroup holiday
|
||||
*/
|
||||
|
||||
include 'common.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT. '/user/class/user.class.php';
|
||||
require('../main.inc.php');
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||
|
||||
// Protection if external user
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
@ -145,7 +145,7 @@ if ($user->societe_id == 0)
|
||||
! empty($conf->propal->enabled) && $user->rights->propale->lire,
|
||||
! empty($conf->commande->enabled) && $user->rights->commande->lire,
|
||||
! empty($conf->facture->enabled) && $user->rights->facture->lire,
|
||||
! empty($conf->societe->enabled) && $user->rights->contrat->activer);
|
||||
! empty($conf->contrat->enabled) && $user->rights->contrat->activer);
|
||||
// Class file containing the method load_state_board for each line
|
||||
$includes=array(DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
|
||||
DOL_DOCUMENT_ROOT."/comm/prospect/class/prospect.class.php",
|
||||
|
||||
@ -3,7 +3,7 @@ CHARSET= UTF-8
|
||||
|
||||
CPTitreMenu=Holidays
|
||||
MenuReportMonth=Monthly statement
|
||||
MenuAddCP=Demand for holidays
|
||||
MenuAddCP=Apply for holidays
|
||||
NotActiveModCP=You must enable the module holidays to view this page.
|
||||
NotConfigModCP=You must configure the module holidays to view this page. To do this, <a href="./admin/holiday.php?leftmenu=setup&mainmenu=home" style="font-weight: normal; color: red; text-decoration: underline;"> click here </ a>.
|
||||
NoCPforUser=You don't have a demand for holidays.
|
||||
@ -23,7 +23,7 @@ ListeCP=List of holidays
|
||||
ValidateByCP=Will be validated by
|
||||
DescCP=Description
|
||||
SendRequestCP=Creating demand for holidays
|
||||
DelayToRequestCP=Applications for holidays must be made at least <b>% s day </ b> before them.
|
||||
DelayToRequestCP=Applications for holidays must be made at least <b>%s day(s)</b> before them.
|
||||
MenuConfCP=Define the holidays
|
||||
UpdateAllCP=Update the holidays
|
||||
SoldeCPUser=Your balance of holidays is <b>%s</b> days.
|
||||
|
||||
@ -45,6 +45,7 @@
|
||||
<file>../../htdocs/boutique/osc_master.inc.php</file>
|
||||
<file>../../htdocs/compta/bank/pre.inc.php</file>
|
||||
<file>../../htdocs/compta/paiement/cheque/pre.inc.php</file>
|
||||
<file>../../htdocs/holiday/common.inc.php</file>
|
||||
<file>../../htdocs/ftp/pre.inc.php</file>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
|
||||
@ -47,6 +47,7 @@
|
||||
<file>../../htdocs/boutique/osc_master.inc.php</file>
|
||||
<file>../../htdocs/compta/bank/pre.inc.php</file>
|
||||
<file>../../htdocs/compta/paiement/cheque/pre.inc.php</file>
|
||||
<file>../../htdocs/holiday/common.inc.php</file>
|
||||
<file>../../htdocs/ftp/pre.inc.php</file>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user