2
0
forked from Wavyzz/dolibarr

NEW Support of monthly or weekly recurring events

This commit is contained in:
ldestailleur
2025-04-03 14:58:41 +02:00
parent 9a54786884
commit ab742e7bd8
2 changed files with 5 additions and 5 deletions

View File

@@ -543,7 +543,7 @@ if (empty($reshook) && $action == 'add' && $usercancreate) {
// Is event recurrent ?
$eventisrecurring = 0;
$userepeatevent = (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1 ? 1 : 0);
$userepeatevent = (getDolGlobalInt('MAIN_DISABLE_RECURRING_EVENTS') ? 0 : 1);
if ($userepeatevent && !empty($selectedrecurrulefreq) && $selectedrecurrulefreq != 'no') {
$eventisrecurring = 1;
$object->recurid = dol_print_date(dol_now('gmt'), 'dayhourlog', 'gmt');
@@ -1452,7 +1452,7 @@ if ($action == 'create') {
print '</td></tr>';
// Recurring event
$userepeatevent = (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1 ? 1 : 0);
$userepeatevent = (getDolGlobalInt('MAIN_DISABLE_RECURRING_EVENTS') ? 0 : 1);
if ($userepeatevent) {
print '<tr><td></td><td>';
@@ -1481,7 +1481,7 @@ if ($action == 'create') {
$selectedrecurrulebyday = (int) $reg[1];
}
print $form->selectarray('recurrulefreq', $arrayrecurrulefreq, $selectedrecurrulefreq, 0, 0, 0, '', 0, 0, 0, '', 'marginrightonly');
print $form->selectarray('recurrulefreq', $arrayrecurrulefreq, $selectedrecurrulefreq, 0, 0, 0, '', 0, 0, 0, '', 'marginrightonly minwidth100');
// print '<script>console.log("recurrule: " +'.$object->recurrule.')</script>';
// For recursive event
@@ -2087,7 +2087,7 @@ if ($id > 0) {
print '<label for="fullday">'.$langs->trans("EventOnFullDay").'</label>';
// // Recurring event
// $userepeatevent = (getDolGlobalInt('MAIN_FEATURES_LEVEL') == 2 ? 1 : 0);
// $userepeatevent = (getDolGlobalInt('MAIN_DISABLE_RECURRING_EVENTS') ? 0 : 1);
// if ($userepeatevent) {
// // Repeat
// //print '<tr><td></td><td colspan="3">';

View File

@@ -6832,7 +6832,7 @@ function print_barre_liste($title, $page, $file, $options = '', $sortfield = '',
do {
if ($pagenavastextinput) {
if ($cpt == $page) {
$pagelist .= '<li class="pagination pageplusone valignmiddle"><input type="text" class="'.($totalnboflines > 100 ? 'width40' : 'width25').' center pageplusone" name="pageplusone" value="'.($page + 1).'"></li>';
$pagelist .= '<li class="pagination pageplusone valignmiddle"><input type="text" class="'.($totalnboflines > 100 ? 'width40' : 'width25').' center pageplusone heightofcombo" name="pageplusone" value="'.($page + 1).'"></li>';
$pagelist .= '/';
}
} else {