Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions htdocs/core/tpl/massactions_pre.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
if (in_array($massaction, array('preupdate_selected_tasks_progress', 'preupdate_selected_tasks_start_date', 'preupdate_selected_tasks_deadline'), true) && is_object($objecttmp) && $objecttmp->element == 'project_task') {
dol_syslog(__FILE__." render pre-massaction modal for massaction='".$massaction."' selected=".count((array) $toselect), LOG_WARNING);
if (!$user->hasRight('projet', 'creer')) {
setEventMessages($langs->trans('ErrorNotEnoughPermissions'), null, 'errors');
setEventMessages($langs->trans('NotEnoughPermissions'), null, 'errors');
} else {
$tasksById = $objecttmp->getAuthorizedTasksForMassAction($user, $toselect);
dol_syslog(__FILE__." pre-massaction authorized tasks=".count($tasksById), LOG_WARNING);
Expand All @@ -123,26 +123,26 @@
$modalHeight = min(900, $modalBodyHeight + 220);
$formquestion = array();
$currentProjectId = GETPOSTINT('id');
if ($currentProjectId > 0) {

Check failure on line 126 in htdocs/core/tpl/massactions_pre.tpl.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Line indented incorrectly; expected 3 tabs, found 4
$formquestion[] = array('type' => 'hidden', 'name' => 'id', 'value' => $currentProjectId);
}

Check failure on line 128 in htdocs/core/tpl/massactions_pre.tpl.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Line indented incorrectly; expected 3 tabs, found 4
$formquestion[] = array('type' => 'hidden', 'name' => 'massactiontaskfinal', 'value' => $finalAction);
$formquestion[] = array('type' => 'hidden', 'name' => 'toselect', 'value' => implode(',', array_keys($tasksById)));

if ($finalAction == 'update_selected_tasks_progress') {

Check failure on line 132 in htdocs/core/tpl/massactions_pre.tpl.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Line indented incorrectly; expected 3 tabs, found 4
$progressInputNames = array();
$tablehtml = '<div id="project_task_massaction_modal_wrapper" data-body-height="'.((int) $modalBodyHeight).'" data-modal-height="'.((int) $modalHeight).'"><table class="noborder centpercent">';
$tablehtml .= '<tr class="liste_titre"><th>'.$langs->trans('Task').'</th><th class="right">'.$langs->trans('Progress').'</th></tr>';
foreach ($tasksById as $taskId => $taskDb) {

Check failure on line 136 in htdocs/core/tpl/massactions_pre.tpl.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Line indented incorrectly; expected 4 tabs, found 5
$inputname = 'task_progress_'.$taskId;
$progressInputNames[] = $inputname;
$tablehtml .= '<tr><td>'.dol_escape_htmltag(!empty($taskDb->label) ? $taskDb->label : $taskDb->ref).'</td>';
$tablehtml .= '<td class="right"><input type="text" class="flat right width75" maxlength="6" id="'.dol_escape_htmltag($inputname).'" name="'.dol_escape_htmltag($inputname).'" value="'.((string) min(100, max(0, (int) $taskDb->progress))).'"> %</td></tr>';
}

Check failure on line 141 in htdocs/core/tpl/massactions_pre.tpl.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Line indented incorrectly; expected 4 tabs, found 5
$tablehtml .= '</table></div>';
$formquestion[] = array('type' => 'other', 'name' => implode(',', $progressInputNames), 'label' => '', 'value' => $tablehtml);
$titleform = $langs->trans('MassActionUpdateSelectedTasksProgress');
} else {

Check failure on line 145 in htdocs/core/tpl/massactions_pre.tpl.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Line indented incorrectly; expected 3 tabs, found 4
$dateInputNames = array();
$keepDurationNames = array();
$tablehtml = '<div id="project_task_massaction_modal_wrapper" data-body-height="'.((int) $modalBodyHeight).'" data-modal-height="'.((int) $modalHeight).'">';
Expand All @@ -152,21 +152,21 @@
$tablehtml .= '<input type="button" class="button button-small smallpaddingimp" id="apply_global_task_datetime" value="'.dol_escape_htmltag($langs->trans('Apply')).'">';
$tablehtml .= '</div>';
$tablehtml .= '<table class="noborder centpercent">';
$tablehtml .= '<tr class="liste_titre"><th>'.$langs->trans('Task').'</th><th class="center">'.$langs->trans('DateHour').'</th><th class="center">'.$langs->trans('MassActionKeepTaskDuration').'</th></tr>';
$tablehtml .= '<tr class="liste_titre"><th>'.$langs->trans('Task').'</th><th class="center">'.$langs->trans('DateHour').'</th><th class="center">'.$langs->trans('Duration').'</th></tr>';

Check failure on line 155 in htdocs/core/tpl/massactions_pre.tpl.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Missing translation; $tablehtml .= '<tr class="liste_titre"><th>'.$langs->trans('Task').'</th><th class="center">'.$langs->trans('DateHour').'</th><th class="center">'.$langs->trans('Duration').'</th></tr>';

Check failure on line 155 in htdocs/core/tpl/massactions_pre.tpl.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Missing translation; $tablehtml .= '<tr class="liste_titre"><th>'.$langs->trans('Task').'</th><th class="center">'.$langs->trans('DateHour').'</th><th class="center">'.$langs->trans('Duration').'</th></tr>';
foreach ($tasksById as $taskId => $taskDb) {

Check failure on line 156 in htdocs/core/tpl/massactions_pre.tpl.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Line indented incorrectly; expected 4 tabs, found 5
$datetimeName = 'task_datetime_'.$taskId;
$keepdurationname = 'keep_duration_'.$taskId;
$dateInputNames[] = $datetimeName;
$keepDurationNames[] = $keepdurationname;
if ($finalAction == 'update_selected_tasks_start_date') {

Check failure on line 161 in htdocs/core/tpl/massactions_pre.tpl.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Line indented incorrectly; expected 5 tabs, found 6
$currenttimestamp = (!empty($taskDb->dateo) ? (int) $db->jdate($taskDb->dateo) : dol_now());
} else {

Check failure on line 163 in htdocs/core/tpl/massactions_pre.tpl.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Line indented incorrectly; expected 5 tabs, found 6
$currenttimestamp = (!empty($taskDb->datee) ? (int) $db->jdate($taskDb->datee) : dol_now());
}
$datetimevalue = dol_print_date($currenttimestamp, '%Y-%m-%dT%H:%M');
$tablehtml .= '<tr><td>'.dol_escape_htmltag(!empty($taskDb->label) ? $taskDb->label : $taskDb->ref).'</td>';
$tablehtml .= '<td class="center"><input type="datetime-local" class="flat" id="'.dol_escape_htmltag($datetimeName).'" name="'.dol_escape_htmltag($datetimeName).'" value="'.dol_escape_htmltag($datetimevalue).'"></td>';
$tablehtml .= '<td class="center"><input type="checkbox" class="flat" id="'.dol_escape_htmltag($keepdurationname).'" name="'.dol_escape_htmltag($keepdurationname).'" value="1"></td></tr>';
}
$datetimevalue = dol_print_date($currenttimestamp, '%Y-%m-%dT%H:%M');
$tablehtml .= '<tr><td>'.dol_escape_htmltag(!empty($taskDb->label) ? $taskDb->label : $taskDb->ref).'</td>';
$tablehtml .= '<td class="center"><input type="datetime-local" class="flat" id="'.dol_escape_htmltag($datetimeName).'" name="'.dol_escape_htmltag($datetimeName).'" value="'.dol_escape_htmltag($datetimevalue).'"></td>';
$tablehtml .= '<td class="center"><input type="checkbox" class="flat" id="'.dol_escape_htmltag($keepdurationname).'" name="'.dol_escape_htmltag($keepdurationname).'" value="1"></td></tr>';
}
$tablehtml .= '</table></div>';
$formquestion[] = array('type' => 'other', 'name' => implode(',', array_merge($dateInputNames, $keepDurationNames)), 'label' => '', 'value' => $tablehtml);
Expand Down
Loading