summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
authorjwacalex <aboehm@dompfaffenweg.de>2016-11-30 23:23:49 +0100
committerjwacalex <aboehm@dompfaffenweg.de>2016-11-30 23:23:49 +0100
commit45cda10479a16c237f917b69dc24ab3f31bffa89 (patch)
tree5aa98a6504d7558b56b7777f04b87a3b976bbedf /includes/pages
parent79b9f9448e4f3ad7abb8d795c1404b3221c95bf9 (diff)
parent53e12065c76af4e5a0a2690e92e6724eed9f2895 (diff)
merged master and issue
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/guest_login.php54
-rw-r--r--includes/pages/user_atom.php3
-rw-r--r--includes/pages/user_ical.php3
-rw-r--r--includes/pages/user_questions.php2
-rw-r--r--includes/pages/user_settings.php4
5 files changed, 36 insertions, 30 deletions
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php
index 69201161..cba5717b 100644
--- a/includes/pages/guest_login.php
+++ b/includes/pages/guest_login.php
@@ -106,7 +106,7 @@ function guest_register() {
$msg .= error(sprintf(_("Your password is too short (please use at least %s characters)."), MIN_PASSWORD_LENGTH), true);
}
- if (isset($_REQUEST['planned_arrival_date']) && $tmp = parse_date("Y-m-d", $_REQUEST['planned_arrival_date'])) {
+ if (isset($_REQUEST['planned_arrival_date']) && $tmp = parse_date("Y-m-d H:i", $_REQUEST['planned_arrival_date'] . " 00:00")) {
$planned_arrival_date = $tmp;
} else {
$valid = false;
@@ -212,7 +212,7 @@ function guest_register() {
]),
div('col-sm-8', [
form_email('mail', _("E-Mail") . ' ' . entry_required(), $mail),
- form_checkbox('email_shiftinfo', _("The engelsystem is allowed to send me an email (e.g. when my shifts change)"), $email_shiftinfo),
+ form_checkbox('email_shiftinfo', _("The engelsystem is allowed to send me an email (e.g. when my shifts change)"), $email_shiftinfo),
form_checkbox('email_by_human_allowed', _("Humans are allowed to send me an email (e.g. for ticket vouchers)"), $email_by_human_allowed)
])
]),
@@ -233,7 +233,7 @@ function guest_register() {
])
]),
form_checkboxes('angel_types', _("What do you want to do?") . sprintf(" (<a href=\"%s\">%s</a>)", page_link_to('angeltypes') . '&action=about', _("Description of job types")), $angel_types, $selected_angel_types),
- form_info("", _("Restricted angel types need will be confirmed later by an archangel. You can change your selection in the options section."))
+ form_info("", _("Restricted angel types need will be confirmed later by a supporter. You can change your selection in the options section."))
]),
div('col-md-6', [
div('row', [
@@ -286,9 +286,9 @@ function guest_login() {
$nick = "";
unset($_SESSION['uid']);
+ $valid = true;
if (isset($_REQUEST['submit'])) {
- $valid = true;
if (isset($_REQUEST['nick']) && strlen(User_validate_Nick($_REQUEST['nick'])) > 0) {
$nick = User_validate_Nick($_REQUEST['nick']);
@@ -306,7 +306,7 @@ function guest_login() {
}
} else {
$valid = false;
- error(_("No user was found with that Nickname. Please try again. If you are still having problems, ask an Dispatcher."));
+ error(_("No user was found with that Nickname. Please try again. If you are still having problems, ask a Dispatcher."));
}
} else {
$valid = false;
@@ -326,25 +326,37 @@ function guest_login() {
return page([
div('col-md-12', [
div('row', [
- div('col-md-4', [
- EventConfig_countdown_page($event_config)
- ]),
- div('col-md-4', [
- heading(login_title(), 2),
- msg(),
- form([
- form_text('nick', _("Nick"), $nick),
- form_password('password', _("Password")),
- form_submit('submit', _("Login")),
- buttons([
- button(page_link_to('user_password_recovery'), _("I forgot my password"))
+ EventConfig_countdown_page($event_config)
+ ]),
+ div('row', [
+ div('col-sm-6 col-sm-offset-3 col-md-4 col-md-offset-4', [
+ div('panel panel-primary first', [
+ div('panel-heading', [
+ '<span class="icon-icon_angel"></span> ' . _("Login")
+ ]),
+ div('panel-body', [
+ msg(),
+ form([
+ form_text_placeholder('nick', _("Nick"), $nick),
+ form_password_placeholder('password', _("Password")),
+ form_submit('submit', _("Login")),
+ ! $valid ? buttons([
+ button(page_link_to('user_password_recovery'), _("I forgot my password"))
+ ]) : ''
+ ])
]),
- info(_("Please note: You have to activate cookies!"), true)
+ div('panel-footer', [
+ glyph('info-sign') . _("Please note: You have to activate cookies!")
+ ])
])
- ]),
- div('col-md-4', [
+ ])
+ ]),
+ div('row', [
+ div('col-sm-6 text-center', [
heading(register_title(), 2),
- get_register_hint(),
+ get_register_hint()
+ ]),
+ div('col-sm-6 text-center', [
heading(_("What can I do?"), 2),
'<p>' . _("Please read about the jobs you can do to help us.") . '</p>',
buttons([
diff --git a/includes/pages/user_atom.php b/includes/pages/user_atom.php
index 1313d92c..9a765634 100644
--- a/includes/pages/user_atom.php
+++ b/includes/pages/user_atom.php
@@ -10,9 +10,6 @@ function user_atom() {
$key = $_REQUEST['key'];
$user = User_by_api_key($key);
- if ($user === false) {
- engelsystem_error("Unable to find user.");
- }
if ($user == null) {
engelsystem_error("Key invalid.");
}
diff --git a/includes/pages/user_ical.php b/includes/pages/user_ical.php
index 553b8860..34860b70 100644
--- a/includes/pages/user_ical.php
+++ b/includes/pages/user_ical.php
@@ -12,9 +12,6 @@ function user_ical() {
$key = $_REQUEST['key'];
$user = User_by_api_key($key);
- if ($user === false) {
- engelsystem_error("Unable to find user.");
- }
if ($user == null) {
engelsystem_error("Key invalid.");
}
diff --git a/includes/pages/user_questions.php b/includes/pages/user_questions.php
index 7acdee78..4abceb92 100644
--- a/includes/pages/user_questions.php
+++ b/includes/pages/user_questions.php
@@ -1,7 +1,7 @@
<?php
function questions_title() {
- return _("Ask an archangel");
+ return _("Ask the Heaven");
}
function user_questions() {
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php
index 02c61a20..a147b437 100644
--- a/includes/pages/user_settings.php
+++ b/includes/pages/user_settings.php
@@ -44,7 +44,7 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes) {
}
if (isset($_REQUEST['planned_arrival_date'])) {
- $tmp = parse_date("Y-m-d", $_REQUEST['planned_arrival_date']);
+ $tmp = parse_date("Y-m-d H:i", $_REQUEST['planned_arrival_date'] . " 00:00");
$result = User_validate_planned_arrival_date($tmp);
$user_source['planned_arrival_date'] = $result->getValue();
if (! $result->isValid()) {
@@ -54,7 +54,7 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes) {
}
if (isset($_REQUEST['planned_departure_date'])) {
- $tmp = parse_date("Y-m-d", $_REQUEST['planned_departure_date']);
+ $tmp = parse_date("Y-m-d H:i", $_REQUEST['planned_departure_date'] . " 00:00");
$result = User_validate_planned_departure_date($user_source['planned_arrival_date'], $tmp);
$user_source['planned_departure_date'] = $result->getValue();
if (! $result->isValid()) {