diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-12-17 12:45:45 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-12-17 12:45:45 +0000 |
commit | 8c9c23b0606a3f4655da71a580a58ea589834efc (patch) | |
tree | 00c90b5cda65954c7904c8c3ff3122808d35b4bc /views/default/input/text.php | |
parent | 7e1b63792bc51cf6d313199512564a1750562088 (diff) | |
download | elgg-8c9c23b0606a3f4655da71a580a58ea589834efc.tar.gz elgg-8c9c23b0606a3f4655da71a580a58ea589834efc.tar.bz2 |
fixed notices caused by some input views
git-svn-id: http://code.elgg.org/elgg/trunk@3766 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/input/text.php')
-rw-r--r-- | views/default/input/text.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/views/default/input/text.php b/views/default/input/text.php index 1814e5801..e4d39e0ba 100644 --- a/views/default/input/text.php +++ b/views/default/input/text.php @@ -18,11 +18,17 @@ */ -$class = $vars['class']; -if (!$class) { +if (isset($vars['class'])) { + $class = $vars['class']; +} else { $class = "input-text"; } +$disabled = false; +if (isset($vars['disabled'])) { + $disabled = $vars['disabled']; +} + ?> -<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/>
\ No newline at end of file +<input type="text" <?php if ($disabled) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/>
\ No newline at end of file |