From c3cdb7635433b27a045bb8c17f5fb27a423974c5 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Sat, 12 Feb 2011 03:59:57 +0000 Subject: Refs #2143: DRYed up input/file git-svn-id: http://code.elgg.org/elgg/trunk@8141 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/input/file.php | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'views') diff --git a/views/default/input/file.php b/views/default/input/file.php index 28ab54f94..4c42042e8 100644 --- a/views/default/input/file.php +++ b/views/default/input/file.php @@ -6,11 +6,6 @@ * @package Elgg * @subpackage Core * - * @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? * @uses $vars['value'] The current value if any * */ @@ -19,15 +14,13 @@ if (!empty($vars['value'])) { echo elgg_echo('fileexists') . "
"; } -$class = "elgg-input-file"; -if (isset($vars['class'])) { - $class = $vars['class']; -} +$defaults = array( + 'class' => 'elgg-input-file', + 'disabled' => FALSE, + 'size' => 30, +); -$disabled = false; -if (isset($vars['disabled'])) { - $disabled = $vars['disabled']; -} +$attrs = array_merge($defaults, $vars); ?> - name="" class="" /> \ No newline at end of file + /> \ No newline at end of file -- cgit v1.2.3