Commit bf879912 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt

commit ALL the things

parent a1faae91
<?php
$locales = array(
'de_DE.UTF-8' => "Deutsch",
'en_US.UTF-8' => "English"
'de_DE.UTF-8' => "Deutsch"
);
$default_locale = 'en_US.UTF-8';
$default_locale = 'de_DE.UTF-8';
/**
* Return currently active locale
*/
function locale() {
return $_SESSION['locale'];
global $default_locale;
return $default_locale;
}
/**
......@@ -65,4 +65,4 @@ function make_langselect() {
return $items;
}
?>
\ No newline at end of file
?>
......@@ -37,20 +37,20 @@ function admin_user() {
$html .= " <tr><td>lastLogIn</td><td>" . date("Y-m-d H:i", $user_source['lastLogIn']) . "</td></tr>\n";
$html .= " <tr><td>Name</td><td>" . "<input type=\"text\" size=\"40\" name=\"eName\" value=\"" . $user_source['Name'] . "\"></td></tr>\n";
$html .= " <tr><td>Vorname</td><td>" . "<input type=\"text\" size=\"40\" name=\"eVorname\" value=\"" . $user_source['Vorname'] . "\"></td></tr>\n";
$html .= " <tr><td>Alter</td><td>" . "<input type=\"text\" size=\"5\" name=\"eAlter\" value=\"" . $user_source['Alter'] . "\"></td></tr>\n";
$html .= " <tr><td>Telefon</td><td>" . "<input type=\"text\" size=\"40\" name=\"eTelefon\" value=\"" . $user_source['Telefon'] . "\"></td></tr>\n";
//$html .= " <tr><td>Alter</td><td>" . "<input type=\"text\" size=\"5\" name=\"eAlter\" value=\"" . $user_source['Alter'] . "\"></td></tr>\n";
//$html .= " <tr><td>Telefon</td><td>" . "<input type=\"text\" size=\"40\" name=\"eTelefon\" value=\"" . $user_source['Telefon'] . "\"></td></tr>\n";
$html .= " <tr><td>Handy</td><td>" . "<input type=\"text\" size=\"40\" name=\"eHandy\" value=\"" . $user_source['Handy'] . "\"></td></tr>\n";
$html .= " <tr><td>DECT</td><td>" . "<input type=\"text\" size=\"4\" name=\"eDECT\" value=\"" . $user_source['DECT'] . "\"></td></tr>\n";
//$html .= " <tr><td>DECT</td><td>" . "<input type=\"text\" size=\"4\" name=\"eDECT\" value=\"" . $user_source['DECT'] . "\"></td></tr>\n";
$html .= " <tr><td>email</td><td>" . "<input type=\"text\" size=\"40\" name=\"eemail\" value=\"" . $user_source['email'] . "\"></td></tr>\n";
$html .= "<tr><td>" . form_checkbox('email_shiftinfo', _("Please send me an email if my shifts change"), $user_source['email_shiftinfo']) . "</td></tr>\n";
$html .= " <tr><td>jabber</td><td>" . "<input type=\"text\" size=\"40\" name=\"ejabber\" value=\"" . $user_source['jabber'] . "\"></td></tr>\n";
$html .= " <tr><td>Size</td><td>" . html_select_key('size', 'eSize', $tshirt_sizes, $user_source['Size']) . "</td></tr>\n";
//$html .= " <tr><td>Size</td><td>" . html_select_key('size', 'eSize', $tshirt_sizes, $user_source['Size']) . "</td></tr>\n";
$options = array(
'1' => "Yes",
'0' => "No"
);
/*
// Gekommen?
$html .= " <tr><td>Gekommen</td><td>\n";
$html .= html_options('eGekommen', $options, $user_source['Gekommen']) . "</td></tr>\n";
......@@ -58,13 +58,14 @@ function admin_user() {
// Aktiv?
$html .= " <tr><td>Aktiv</td><td>\n";
$html .= html_options('eAktiv', $options, $user_source['Aktiv']) . "</td></tr>\n";
*/
// Aktiv erzwingen
/*
if (in_array('admin_active', $privileges)) {
$html .= " <tr><td>" . _("Force active") . "</td><td>\n";
$html .= html_options('force_active', $options, $user_source['force_active']) . "</td></tr>\n";
}
*/
// T-Shirt bekommen?
$html .= " <tr><td>T-Shirt</td><td>\n";
$html .= html_options('eTshirt', $options, $user_source['Tshirt']) . "</td></tr>\n";
......@@ -74,6 +75,7 @@ function admin_user() {
$html .= "</table>\n</td><td valign=\"top\"></td></tr>";
$html .= "</td></tr>\n";
$html .= "</table>\n<br />\n";
$html .= "<input type=\"submit\" value=\"Speichern\">\n";
$html .= "</form>";
......
......@@ -57,6 +57,7 @@ function user_settings() {
$ok = false;
}
/*
if (isset($_REQUEST['planned_arrival_date']) && DateTime::createFromFormat("Y-m-d", trim($_REQUEST['planned_arrival_date']))) {
$planned_arrival_date = DateTime::createFromFormat("Y-m-d", trim($_REQUEST['planned_arrival_date']))->getTimestamp();
} else {
......@@ -73,7 +74,7 @@ function user_settings() {
}
} else
$planned_departure_date = null;
*/
// Trivia
if (isset($_REQUEST['lastname']))
$lastname = strip_request_item('lastname');
......@@ -83,8 +84,8 @@ function user_settings() {
$age = strip_request_item('age');
if (isset($_REQUEST['tel']))
$tel = strip_request_item('tel');
if (isset($_REQUEST['dect']))
$dect = strip_request_item('dect');
if (isset($_REQUEST['dect']))
$dect = strip_request_item('dect');
if (isset($_REQUEST['mobile']))
$mobile = strip_request_item('mobile');
if (isset($_REQUEST['hometown']))
......@@ -98,7 +99,6 @@ function user_settings() {
`Name`='" . sql_escape($lastname) . "',
`Alter`='" . sql_escape($age) . "',
`Telefon`='" . sql_escape($tel) . "',
`DECT`='" . sql_escape($dect) . "',
`Handy`='" . sql_escape($mobile) . "',
`email`='" . sql_escape($mail) . "',
`email_shiftinfo`=" . sql_bool($email_shiftinfo) . ",
......@@ -168,16 +168,16 @@ function user_settings() {
form_text('nick', _("Nick"), $nick, true),
form_text('lastname', _("Last name"), $lastname),
form_text('prename', _("First name"), $prename),
form_date('planned_arrival_date', _("Planned date of arrival") . ' ' . entry_required(), $planned_arrival_date, time()),
form_date('planned_departure_date', _("Planned date of departure"), $planned_departure_date, time()),
form_text('age', _("Age"), $age),
//form_date('planned_arrival_date', _("Planned date of arrival") . ' ' . entry_required(), $planned_arrival_date, time()),
//form_date('planned_departure_date', _("Planned date of departure"), $planned_departure_date, time()),
//form_text('age', _("Age"), $age),
form_text('tel', _("Phone"), $tel),
form_text('dect', _("DECT"), $dect),
//form_text('dect', _("DECT"), $dect),
form_text('mobile', _("Mobile"), $mobile),
form_text('mail', _("E-Mail") . ' ' . entry_required(), $mail),
form_checkbox('email_shiftinfo', _("Please send me an email if my shifts change"), $email_shiftinfo),
form_text('jabber', _("Jabber"), $jabber),
form_text('hometown', _("Hometown"), $hometown),
//form_text('hometown', _("Hometown"), $hometown),
$enable_tshirt_size ? form_select('tshirt_size', _("Shirt size"), $tshirt_sizes, $tshirt_size) : '',
form_info('', _('Please visit the angeltypes page to manage your angeltypes.')),
form_submit('submit', _("Save"))
......@@ -195,12 +195,13 @@ function user_settings() {
form_info(_("Here you can choose your color settings:")),
form_select('theme', _("Color settings:"), $themes, $selected_theme),
form_submit('submit_theme', _("Save"))
)),
))
/**,
form(array(
form_info(_("Here you can choose your language:")),
form_select('language', _("Language:"), $locales, $selected_language),
form_submit('submit_language', _("Save"))
))
)) **/
))
))
));
......
......@@ -45,33 +45,11 @@ function header_toolbar() {
if ($unconfirmed_hint != '')
$hints[] = $unconfirmed_hint;
if (! isset($user['planned_departure_date']) || $user['planned_departure_date'] == null)
$hints[] = info(_("Please enter your planned date of departure on your settings page to give us a feeling for teardown capacities."), true);
if (User_is_freeloader($user)) {
$hints[] = error(sprintf(_("You freeloaded at least %s shifts. Shift signup is locked. Please go to heavens desk to be unlocked again."), $max_freeloadable_shifts), true);
$hint_class = 'danger';
$glyphicon = 'warning-sign';
}
// Hinweis für Engel, die noch nicht angekommen sind
if ($user['Gekommen'] == 0) {
$hints[] = error(_("You are not marked as arrived. Please go to heaven's desk, get your angel badge and/or tell them that you arrived already."), true);
$hint_class = 'danger';
$glyphicon = 'warning-sign';
}
if ($enable_tshirt_size && $user['Size'] == "") {
$hints[] = error(_("You need to specify a tshirt size in your settings!"), true);
$hint_class = 'danger';
$glyphicon = 'warning-sign';
}
if ($user['DECT'] == "") {
$hints[] = error(_("You need to specify a DECT phone number in your settings! If you don't have a DECT phone, just enter \"-\"."), true);
$hint_class = 'danger';
$glyphicon = 'warning-sign';
}
}
if (count($hints) > 0)
$toolbar_items[] = toolbar_popover($glyphicon . ' text-' . $hint_class, '', $hints, 'bg-' . $hint_class);
......@@ -99,7 +77,8 @@ function make_navigation() {
$menu = array();
$pages = array(
"news" => news_title(),
"user_meetings" => meetings_title(),
// dont need no user meetings!
//"user_meetings" => meetings_title(),
"user_shifts" => shifts_title(),
"angeltypes" => angeltypes_title(),
"user_questions" => questions_title()
......
<!DOCTYPE html>
<html>
<head>
<title>Maintenance - Engelsystem</title>
<title>Maintenance - HROHilftBüro</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/theme0.css" />
......@@ -17,7 +17,7 @@
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1">
<span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="?"><span class="icon-icon_angel"></span> <strong class="visible-lg-inline">ENGELSYSTEM</strong></a>
<a class="navbar-brand" href="?"><strong class="visible-lg-inline">HROHilftBüro</strong></a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav"></ul>
......
......@@ -22,7 +22,3 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-icon_angel:before {
content: "\e600";
}
......@@ -18,7 +18,7 @@
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1">
<span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="?"><span class="icon-icon_angel"></span> <strong class="visible-lg-inline">ENGELSYSTEM</strong></a>
<a class="navbar-brand" href="?"> <strong class="visible-lg-inline">HROHilftBüro</strong></a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-1">%menu% %header_toolbar%</div>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment