diff --git a/Form/OvertimeByUserForm.php b/Form/OvertimeByUserForm.php index afb6777..f813a96 100644 --- a/Form/OvertimeByUserForm.php +++ b/Form/OvertimeByUserForm.php @@ -19,12 +19,10 @@ class OvertimeByUserForm extends AbstractType { /** * Simplify cross linking between pages by removing the block prefix. - * - * @return null|string */ public function getBlockPrefix(): string { - return null; + return ''; } /** diff --git a/Resources/translations/messages.de.xliff b/Resources/translations/messages.de.xliff index 4dfb8bd..c4a86d4 100644 --- a/Resources/translations/messages.de.xliff +++ b/Resources/translations/messages.de.xliff @@ -477,6 +477,18 @@ label.overtime Überstunden + + label.user + Benutzer + + + label.date + Datum + + + label.duration + Dauer + description.overtime_history diff --git a/Resources/translations/messages.en.xliff b/Resources/translations/messages.en.xliff index af22b65..30126ef 100644 --- a/Resources/translations/messages.en.xliff +++ b/Resources/translations/messages.en.xliff @@ -477,6 +477,18 @@ label.overtime Overtime + + label.user + User + + + label.date + User + + + label.duration + Duration + description.overtime_history diff --git a/Resources/translations/messages.hr.xliff b/Resources/translations/messages.hr.xliff index 18818ad..d816e99 100644 --- a/Resources/translations/messages.hr.xliff +++ b/Resources/translations/messages.hr.xliff @@ -469,6 +469,18 @@ label.overtime Tijekom vremena + + label.user + Korisnik + + + label.date + Datum + + + label.duration + Trajanje + description.overtime_history diff --git a/Resources/views/report_by_user.html.twig b/Resources/views/report_by_user.html.twig index b79ec04..6023c6f 100644 --- a/Resources/views/report_by_user.html.twig +++ b/Resources/views/report_by_user.html.twig @@ -316,12 +316,22 @@ window.location.href = '{{ path('not_approved',{'approveId':approveId,'user':user.id,'date':current|date('Y-m-d')}) }}'.replace(/&/g,'&'); } } + function denyAction() { + if (confirm('{{ 'label.undoMessage'|trans }}'.replace(/"/g,'"')) === true) { + window.location.href = '{{ path('denied',{'approveId':approveId,'user':user.id,'date':current|date('Y-m-d')}) }}'.replace(/&/g,'&'); + } + } let undoButton = document.getElementById("undoButton"); if (undoButton) { undoButton.addEventListener("click", undoAction); } + let deniedButton = document.getElementById("deniedButton"); + if (deniedButton) { + deniedButton.addEventListener("click", denyAction); + } + {% endblock %} diff --git a/Resources/views/settings_overtime_history.html.twig b/Resources/views/settings_overtime_history.html.twig index 1cbd9e9..35db4ed 100644 --- a/Resources/views/settings_overtime_history.html.twig +++ b/Resources/views/settings_overtime_history.html.twig @@ -35,7 +35,7 @@ {% set deleteLinkPath = path('delete_overtime_history', {'entryId': entry.id }) %} @@ -81,7 +81,7 @@ $("#deleteMessage").hide(); } }); - }); + }); {% endblock %} diff --git a/Resources/views/settings_workday_history.html.twig b/Resources/views/settings_workday_history.html.twig index fd061ad..9ac2ee4 100644 --- a/Resources/views/settings_workday_history.html.twig +++ b/Resources/views/settings_workday_history.html.twig @@ -56,7 +56,7 @@ {% set deleteLinkPath = path('delete_workday_history', {'entryId': entry.id }) %}