summaryrefslogtreecommitdiff
path: root/includes/sys_form.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-11-18 15:36:02 +0100
committermsquare <msquare@notrademark.de>2016-11-18 15:36:02 +0100
commit409761ce4b2f919ca40aa8319a13473d9eb789ae (patch)
tree061dfdbe4f36b6c0fc065f408f960a20e5735e9f /includes/sys_form.php
parent9098b8e80d4d790609f0a267b88169a129366b1b (diff)
rebuild login page
Diffstat (limited to 'includes/sys_form.php')
-rw-r--r--includes/sys_form.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/includes/sys_form.php b/includes/sys_form.php
index 960be401..98ef2134 100644
--- a/includes/sys_form.php
+++ b/includes/sys_form.php
@@ -176,6 +176,23 @@ function form_text($name, $label, $value, $disabled = false) {
}
/**
+ * Renders a text input with placeholder instead of label.
+ *
+ * @param String $name
+ * Input name
+ * @param String $placeholder
+ * Placeholder
+ * @param String $value
+ * The value
+ * @param Boolean $disabled
+ * Is the field enabled?
+ */
+function form_text_placeholder($name, $placeholder, $value, $disabled = false) {
+ $disabled = $disabled ? ' disabled="disabled"' : '';
+ return form_element('', '<input class="form-control" id="form_' . $name . '" type="text" name="' . $name . '" value="' . htmlspecialchars($value) . '" placeholder="' . $placeholder . '" ' . $disabled . '/>');
+}
+
+/**
* Rendert ein Formular-Emailfeld
*/
function form_email($name, $label, $value, $disabled = false) {
@@ -199,6 +216,14 @@ function form_password($name, $label, $disabled = false) {
}
/**
+ * Renders a password input with placeholder instead of label.
+ */
+function form_password_placeholder($name, $placeholder, $disabled = false) {
+ $disabled = $disabled ? ' disabled="disabled"' : '';
+ return form_element('', '<input class="form-control" id="form_' . $name . '" type="password" name="' . $name . '" value="" placeholder="' . $placeholder . '" ' . $disabled . '/>', 'form_' . $name);
+}
+
+/**
* Rendert ein Formular-Textfeld
*/
function form_textarea($name, $label, $value, $disabled = false) {