summaryrefslogtreecommitdiff
path: root/includes/view
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-11-15 16:31:55 +0100
committermsquare <msquare@notrademark.de>2016-11-15 16:31:55 +0100
commit918d41ca70a7ca1fd59785c31fdf6e0bf39470e9 (patch)
treee501824b8c69f6a015824e3fd77e6e5cd1c7ffb3 /includes/view
parentec6016cd38fc5ce6455cace6ffbc703f78f31096 (diff)
reduce complexity of menu and hints
Diffstat (limited to 'includes/view')
-rw-r--r--includes/view/UserHintsRenderer.php4
-rw-r--r--includes/view/User_view.php10
2 files changed, 8 insertions, 6 deletions
diff --git a/includes/view/UserHintsRenderer.php b/includes/view/UserHintsRenderer.php
index 54f9c149..cf4b1414 100644
--- a/includes/view/UserHintsRenderer.php
+++ b/includes/view/UserHintsRenderer.php
@@ -32,9 +32,11 @@ class UserHintsRenderer {
*/
public function addHint($hint, $important = false) {
if ($hint != null && $hint != '') {
- $this->hints[] = $hint;
if ($important) {
$this->important = true;
+ $this->hints[] = error($hint, true);
+ } else {
+ $this->hints[] = info($hint, true);
}
}
}
diff --git a/includes/view/User_view.php b/includes/view/User_view.php
index 5349711a..ef7abad6 100644
--- a/includes/view/User_view.php
+++ b/includes/view/User_view.php
@@ -419,7 +419,7 @@ function render_user_departure_date_hint() {
global $user;
if (! isset($user['planned_departure_date']) || $user['planned_departure_date'] == null) {
- return info(_("Please enter your planned date of departure on your settings page to give us a feeling for teardown capacities."), true);
+ return _("Please enter your planned date of departure on your settings page to give us a feeling for teardown capacities.");
}
return null;
@@ -429,7 +429,7 @@ function render_user_freeloader_hint() {
global $user;
if (User_is_freeloader($user)) {
- return 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);
+ return sprintf(_("You freeloaded at least %s shifts. Shift signup is locked. Please go to heavens desk to be unlocked again."), $max_freeloadable_shifts);
}
return null;
@@ -440,7 +440,7 @@ function render_user_arrived_hint() {
global $user;
if ($user['Gekommen'] == 0) {
- return 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);
+ return _("You are not marked as arrived. Please go to heaven's desk, get your angel badge and/or tell them that you arrived already.");
}
return null;
@@ -450,7 +450,7 @@ function render_user_tshirt_hint() {
global $enable_tshirt_size, $user;
if ($enable_tshirt_size && $user['Size'] == "") {
- return error(_("You need to specify a tshirt size in your settings!"), true);
+ return _("You need to specify a tshirt size in your settings!");
}
return null;
@@ -460,7 +460,7 @@ function render_user_dect_hint() {
global $user;
if ($user['DECT'] == "") {
- return error(_("You need to specify a DECT phone number in your settings! If you don't have a DECT phone, just enter \"-\"."), true);
+ return _("You need to specify a DECT phone number in your settings! If you don't have a DECT phone, just enter \"-\".");
}
return null;