aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/plaintext.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input/plaintext.php')
-rw-r--r--views/default/input/plaintext.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php
new file mode 100644
index 000000000..e92c61ced
--- /dev/null
+++ b/views/default/input/plaintext.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Elgg long text input (plaintext)
+ * Displays a long text input field that should not be overridden by wysiwyg editors.
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['class'] Additional CSS class
+ * @uses $vars['disabled']
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-plaintext {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-plaintext";
+}
+
+$defaults = array(
+ 'value' => '',
+ 'rows' => '10',
+ 'cols' => '50',
+ 'disabled' => false,
+);
+
+$vars = array_merge($defaults, $vars);
+
+$value = $vars['value'];
+unset($vars['value']);
+
+?>
+
+<textarea <?php echo elgg_format_attributes($vars); ?>>
+<?php echo htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false); ?>
+</textarea>