aboutsummaryrefslogtreecommitdiff
path: root/views/default/input
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 06:46:21 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 06:46:21 +0000
commit606ae57ee7a245736367068db7827849215b9e07 (patch)
tree4de112d6ef9cf05a594248e27b35b6ae6ed4d93a /views/default/input
parentc0888ecec0b24332112739aa5dfd972d9eb76654 (diff)
downloadelgg-606ae57ee7a245736367068db7827849215b9e07.tar.gz
elgg-606ae57ee7a245736367068db7827849215b9e07.tar.bz2
Refs #2143: DRYed up input/longtext -- maybe I missed it, but was there a difference b/w plaintext and longtext?
git-svn-id: http://code.elgg.org/elgg/trunk@8146 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/input')
-rw-r--r--views/default/input/longtext.php25
1 files changed, 5 insertions, 20 deletions
diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php
index 4a24d1a43..43534eec7 100644
--- a/views/default/input/longtext.php
+++ b/views/default/input/longtext.php
@@ -7,28 +7,13 @@
* @subpackage Core
*
* @uses $vars['value'] The current value, if any - will be html encoded
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['internalid'] The id of the input field
- * @uses $vars['class'] CSS class
* @uses $vars['disabled'] Is the input field disabled?
*/
-$class = "elgg-input-textarea";
-if (isset($vars['class'])) {
- $class = $vars['class'];
-}
+$defaults = array(
+ 'class' => 'elgg-input-longtext',
+);
-$disabled = false;
-if (isset($vars['disabled'])) {
- $disabled = $vars['disabled'];
-}
+$vars = array_merge($defaults, $vars);
-$value = '';
-if (isset($vars['value'])) {
- $value = $vars['value'];
-}
-
-?>
-
-<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($disabled) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($value, ENT_QUOTES, 'UTF-8'); ?></textarea> \ No newline at end of file
+echo elgg_view('input/plaintext', $vars);