summaryrefslogtreecommitdiff
path: root/includes/view
diff options
context:
space:
mode:
Diffstat (limited to 'includes/view')
-rw-r--r--includes/view/UserDriverLicenses_view.php14
-rw-r--r--includes/view/User_view.php9
2 files changed, 14 insertions, 9 deletions
diff --git a/includes/view/UserDriverLicenses_view.php b/includes/view/UserDriverLicenses_view.php
index 0c46b567..317910b6 100644
--- a/includes/view/UserDriverLicenses_view.php
+++ b/includes/view/UserDriverLicenses_view.php
@@ -53,18 +53,18 @@ function UserDriverLicense_edit_view($user_source, $wants_to_drive, $user_driver
]),
'<script type="text/javascript">
$(function() {
- var checkbox = $("#wants_to_drive");
- if(checkbox.is(":checked"))
- $("#driving_license").show();
+ var checkbox = $(\'#wants_to_drive\');
+ if(checkbox.is(\':checked\'))
+ $(\'#driving_license\').show();
else
- $("#driving_license").hide();
+ $(\'#driving_license\').hide();
checkbox.click(
function() {
- if($("#wants_to_drive").is(":checked"))
- $("#driving_license").show();
+ if($(\'#wants_to_drive\').is(\':checked\'))
+ $(\'#driving_license\').show();
else
- $("#driving_license").hide();
+ $(\'#driving_license\').hide();
}
);
});
diff --git a/includes/view/User_view.php b/includes/view/User_view.php
index 40e7bfe1..3d5cfd69 100644
--- a/includes/view/User_view.php
+++ b/includes/view/User_view.php
@@ -532,6 +532,7 @@ function User_view(
$admin_user_worklog_privilege,
$user_worklogs
) {
+ $nightShiftsConfig = config('night_shifts');
$user_name = htmlspecialchars($user_source['Vorname']) . ' ' . htmlspecialchars($user_source['Name']);
$myshifts_table = '';
if ($its_me || $admin_user_privilege) {
@@ -619,8 +620,12 @@ function User_view(
]),
($its_me || $admin_user_privilege) ? '<h2>' . __('Shifts') . '</h2>' : '',
$myshifts_table,
- $its_me ? info(
- glyph('info-sign') . __('Your night shifts between 2 and 8 am count twice.'),
+ ($its_me && $nightShiftsConfig['enabled']) ? info(
+ glyph('info-sign') . sprintf(
+ __('Your night shifts between %d and %d am count twice.'),
+ $nightShiftsConfig['start'],
+ $nightShiftsConfig['end']
+ ),
true
) : '',
$its_me && count($shifts) == 0