aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input/text.php')
-rw-r--r--views/default/input/text.php12
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