Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
1e7c5fff6d
@ -882,7 +882,7 @@ $object = new Holiday($db);
|
||||
|
||||
$listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->trans("Afternoon"));
|
||||
|
||||
$title = $langs->trans('CPTitreMenu');
|
||||
$title = $langs->trans('Leave');
|
||||
$help_url = 'EN:Module_Holiday';
|
||||
|
||||
llxHeader('', $title, $help_url);
|
||||
@ -1088,7 +1088,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("DescCP").'</td>';
|
||||
print '<td class="tdtop">';
|
||||
$doleditor = new DolEditor('description', GETPOST('description', 'restricthtml'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
||||
$doleditor = new DolEditor('description', GETPOST('description', 'restricthtml'), '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
|
||||
@ -1158,7 +1158,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
||||
setEventMessages($errors, null, 'errors');
|
||||
}
|
||||
|
||||
// On vérifie si l'utilisateur à le droit de lire cette demande
|
||||
// check if the user has the right to read this request
|
||||
if ($canread) {
|
||||
$head = holiday_prepare_head($object);
|
||||
|
||||
@ -1289,7 +1289,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans('DescCP').'</td>';
|
||||
print '<td class="tdtop">';
|
||||
$doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
||||
$doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -1433,11 +1433,9 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
||||
|
||||
if (($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) || ($action == 'editvalidator')) {
|
||||
if ($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) {
|
||||
print '<div class="center">';
|
||||
if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) {
|
||||
print '<input type="submit" value="'.$langs->trans("Save").'" class="button button-save">';
|
||||
print $form->buttonsSaveCancel();
|
||||
}
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
@ -1521,7 +1519,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
||||
$action = 'presend';
|
||||
}
|
||||
|
||||
if ($action != 'presend') {
|
||||
if ($action != 'presend' && $action != 'edit') {
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
print '<a name="builddoc"></a>'; // ancre
|
||||
|
||||
|
||||
@ -137,8 +137,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||
$form = new Form($db);
|
||||
|
||||
$listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->trans("Afternoon"));
|
||||
|
||||
$title = $langs->trans('InterventionCard');
|
||||
$title = $langs->trans("Leave").' - '.$langs->trans("Files");
|
||||
|
||||
llxHeader('', $title);
|
||||
|
||||
@ -347,12 +346,12 @@ if ($object->id) {
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
|
||||
$modulepart = 'holiday';
|
||||
$permissiontoadd = $user->rights->holiday->write;
|
||||
$permtoedit = $user->rights->holiday->write;
|
||||
$param = '&id='.$object->id;
|
||||
$relativepathwithnofile = $modulepart.'/'.dol_sanitizeFileName($object->ref).'/';
|
||||
$savingdocmask = dol_sanitizeFileName($object->ref).'-__file__';
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
} else {
|
||||
print $langs->trans("ErrorUnknown");
|
||||
|
||||
@ -78,7 +78,7 @@ $result = restrictedArea($user, 'holiday', $object->id, 'holiday');
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans("Holiday")." - ".$langs->trans("Info");
|
||||
$title = $langs->trans("Leave")." - ".$langs->trans("Info");
|
||||
$helpurl = "";
|
||||
llxHeader("", $title, $helpurl);
|
||||
|
||||
|
||||
@ -1121,14 +1121,24 @@ if ($resql) {
|
||||
}
|
||||
|
||||
$hookmanager->initHooks(array('takeposfrontend'));
|
||||
$reshook = $hookmanager->executeHooks('ActionButtons');
|
||||
if (!empty($reshook)) {
|
||||
if (is_array($reshook) && !isset($reshook['title'])) {
|
||||
foreach ($reshook as $reshook) {
|
||||
$menus[$r++] = $reshook;
|
||||
$parameters = array('menus'=>$menus);
|
||||
$reshook = $hookmanager->executeHooks('ActionButtons', $parameters);
|
||||
if ($reshook == 0) { //add buttons
|
||||
if (is_array($hookmanager->resArray) ) {
|
||||
foreach ($hookmanager->resArray as $resArray) {
|
||||
foreach ($resArray as $butmenu) {
|
||||
$menus[$r++] = $butmenu;
|
||||
}
|
||||
}
|
||||
} elseif ($reshook == 1) {
|
||||
$r = 0; //replace buttons
|
||||
if (is_array($hookmanager->resArray) ) {
|
||||
foreach ($hookmanager->resArray as $resArray) {
|
||||
foreach ($resArray as $butmenu) {
|
||||
$menus[$r++] = $butmenu;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$menus[$r++] = $reshook;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user