aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 06:42:45 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 06:42:45 +0000
commitc0888ecec0b24332112739aa5dfd972d9eb76654 (patch)
treecebb4a8faa2982b0c18bb3eb27f548fcd8a80bde /views
parent26dd8f6f14179882e88a2180bdbcf35868ad23ca (diff)
downloadelgg-c0888ecec0b24332112739aa5dfd972d9eb76654.tar.gz
elgg-c0888ecec0b24332112739aa5dfd972d9eb76654.tar.bz2
Refs #2143: DRYed up input/plaintext
git-svn-id: http://code.elgg.org/elgg/trunk@8145 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/input/plaintext.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php
index 04ff2f1f0..a0a8a3949 100644
--- a/views/default/input/plaintext.php
+++ b/views/default/input/plaintext.php
@@ -12,11 +12,17 @@
*
*/
-$class = $vars['class'];
-if (!$class) {
- $class = "elgg-input-textarea";
-}
+$defaults = array(
+ 'class' => 'elgg-input-textarea'
+ 'disabled' => FALSE,
+);
+$value = $vars['value'];
+unset($vars['value']);
+
+$attrs = array_merge($defaults, $vars);
?>
-<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea> \ No newline at end of file
+<textarea <?php echo elgg_format_attributes($attrs); ?>>
+ <?php echo htmlentities($value, ENT_QUOTES, 'UTF-8'); ?>
+</textarea>