summaryrefslogtreecommitdiff
path: root/includes/helper
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-12-26 17:08:29 +0100
committerGitHub <noreply@github.com>2017-12-26 17:08:29 +0100
commita3905dc8e8347716c69ab7348a7a93a9c3422d5e (patch)
tree2b1794f92fd00a130b4fb8696bd6bbbaebd676cb /includes/helper
parentb9bbcb93603b4416da2fb59b63c7dbcdf4935bba (diff)
parent6953090e7d789f52761a8f4b505cfbcf0c347018 (diff)
Merge pull request #393 from MyIgel/master
Removed some short ifs from Shifts_view.php, add warning when editing HTML
Diffstat (limited to 'includes/helper')
-rw-r--r--includes/helper/message_helper.php22
1 files changed, 17 insertions, 5 deletions
diff --git a/includes/helper/message_helper.php b/includes/helper/message_helper.php
index 4fa0efe3..3d2b663a 100644
--- a/includes/helper/message_helper.php
+++ b/includes/helper/message_helper.php
@@ -1,7 +1,7 @@
<?php
/**
- * Gibt zwischengespeicherte Fehlermeldungen zurück und löscht den Zwischenspeicher
+ * Returns messages from session and removes them from the stack
*
* @return string
*/
@@ -16,7 +16,7 @@ function msg()
}
/**
- * Rendert eine Information
+ * Renders an information message
*
* @param string $msg
* @param bool $immediately
@@ -28,7 +28,19 @@ function info($msg, $immediately = false)
}
/**
- * Rendert eine Fehlermeldung
+ * Renders a warning message
+ *
+ * @param string $msg
+ * @param bool $immediately
+ * @return string
+ */
+function warning($msg, $immediately = false)
+{
+ return alert('warning', $msg, $immediately);
+}
+
+/**
+ * Renders an error message
*
* @param string $msg
* @param bool $immediately
@@ -40,7 +52,7 @@ function error($msg, $immediately = false)
}
/**
- * Rendert eine Erfolgsmeldung
+ * Renders a success message
*
* @param string $msg
* @param bool $immediately
@@ -52,7 +64,7 @@ function success($msg, $immediately = false)
}
/**
- * Renders an alert with given alert-* class.
+ * Renders an alert message with the given alert-* class.
*
* @param string $class
* @param string $msg