';
+ print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
}
-
- print '';
}
$db->free($result);
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 64e1d05657b..8ec7fa36b73 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -5908,15 +5908,15 @@ abstract class CommonObject
/**
* Function to show lines of extrafields with output datas
*
- * @param Extrafields $extrafields Extrafield Object
- * @param string $mode Show output (view) or input (edit) for extrafield
- * @param array $params Optional parameters
- * @param string $keysuffix Suffix string to add after name and id of field (can be used to avoid duplicate names)
- * @param string $keyprefix Prefix string to add before name and id of field (can be used to avoid duplicate names)
- *
- * @return string
+ * @param Extrafields $extrafields Extrafield Object
+ * @param string $mode Show output (view) or input (edit) for extrafield
+ * @param array $params Optional parameters
+ * @param string $keysuffix Suffix string to add after name and id of field (can be used to avoid duplicate names)
+ * @param string $keyprefix Prefix string to add before name and id of field (can be used to avoid duplicate names)
+ * @param string $onetrtd All fields in same tr td
+ * @return string
*/
- function showOptionals($extrafields, $mode='view', $params=null, $keysuffix='', $keyprefix='')
+ function showOptionals($extrafields, $mode='view', $params=null, $keysuffix='', $keyprefix='', $onetrtd=0)
{
global $_POST, $conf, $langs, $action;
@@ -5980,15 +5980,13 @@ abstract class CommonObject
$csstyle=$params['style'];
}
}
- if ( !empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0)
+
+ $out .= '
';
+ if (empty($onetrtd))
{
- $out .= '
';
- $colspan='0';
- }
- else
- {
- $out .= '
';
+ if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan='0'; }
}
+
// Convert date into timestamp format (value in memory must be a timestamp)
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
{
@@ -6006,10 +6004,17 @@ abstract class CommonObject
{
$labeltoshow = ''.$labeltoshow.'';
}
- $out .= '
';
}
@@ -444,7 +447,7 @@ if ($user->rights->holiday->read_all)
$valideurobjects = $validator->listUsersForGroup($excludefilter);
$valideurarray = array();
foreach($valideurobjects as $val) $valideurarray[$val->id]=$val->id;
- print $form->select_dolusers($search_valideur,"search_valideur",1,"",0,$valideurarray,'', 0, 0, 0, '', 0, '', 'maxwidth200');
+ print $form->select_dolusers($search_valideur, "search_valideur", 1, "", 0, $valideurarray, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth200');
print '';
}
else
@@ -510,9 +513,10 @@ $listhalfday=array('morning'=>$langs->trans("Morning"),"afternoon"=>$langs->tran
// If we ask a dedicated card and not allow to see it, we forc on user.
-if ($id && empty($user->rights->holiday->read_all) && ! in_array($id, $childis))
+if ($id && empty($user->rights->holiday->read_all) && ! in_array($id, $childids))
{
- print '
'.$langs->trans("NotEnoughPermission").'
';
+ $langs->load("errors");
+ print '
'.$langs->trans("NotEnoughPermissions").'
';
$result = 0;
}
// Lines
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index da58499482a..3a7e8a7d14a 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -837,11 +837,11 @@ Permission1251=Run mass imports of external data into database (data load)
Permission1321=Export customer invoices, attributes and payments
Permission1322=Reopen a paid bill
Permission1421=Export customer orders and attributes
-Permission20001=Read leave requests (yours and your subordinates)
-Permission20002=Create/modify your leave requests
+Permission20001=Read leave requests (your leaves and the one of your subordinates)
+Permission20002=Create/modify your leave requests (yours leaves and the one of your subordinates)
Permission20003=Delete leave requests
-Permission20004=Read all leave requests (even user not subordinates)
-Permission20005=Create/modify leave requests for everybody
+Permission20004=Read all leave requests (even of user not subordinates)
+Permission20005=Create/modify leave requests for everybody (even of user not subordinates)
Permission20006=Admin leave requests (setup and update balance)
Permission23001=Read Scheduled job
Permission23002=Create/update Scheduled job
diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang
index 55ba6a1d91d..eca2bbdfe46 100644
--- a/htdocs/langs/en_US/holiday.lang
+++ b/htdocs/langs/en_US/holiday.lang
@@ -71,6 +71,7 @@ DateRefusCP=Date of refusal
DateCancelCP=Date of cancellation
DefineEventUserCP=Assign an exceptional leave for a user
addEventToUserCP=Assign leave
+NotTheAssignedApprover=You are not the assigned approver
MotifCP=Reason
UserCP=User
ErrorAddEventToUserCP=An error occurred while adding the exceptional leave.