aboutsummaryrefslogtreecommitdiff
path: root/views/default/input
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input')
-rw-r--r--views/default/input/access.php6
-rw-r--r--views/default/input/button.php6
-rw-r--r--views/default/input/submit.php2
3 files changed, 7 insertions, 7 deletions
diff --git a/views/default/input/access.php b/views/default/input/access.php
index dfd23df1d..693a8da4a 100644
--- a/views/default/input/access.php
+++ b/views/default/input/access.php
@@ -17,10 +17,10 @@
*
*/
- $class = $vars['class'];
+ if (isset($vars['class'])) $class = $vars['class'];
if (!$class) $class = "input-access";
- if (!is_array($vars['options']))
+ if ((!isset($vars['options'])) || (!is_array($vars['options'])))
{
$vars['options'] = array();
$vars['options'] = get_write_access_array();
@@ -30,7 +30,7 @@
?>
-<select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
+<select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
<?php
foreach($vars['options'] as $key => $option) {
diff --git a/views/default/input/button.php b/views/default/input/button.php
index 9a72f38b0..dab488719 100644
--- a/views/default/input/button.php
+++ b/views/default/input/button.php
@@ -21,7 +21,7 @@
global $CONFIG;
- $class = $vars['class'];
+ if (isset($vars['class'])) $class = $vars['class'];
if (!$class) $class = "submit_button";
if (isset($vars['type'])) { $type = strtolower($vars['type']); } else { $type = 'submit'; }
@@ -34,8 +34,8 @@
}
$value = htmlentities($vars['value'], null, 'UTF-8');
- $name = $vars['internalname'];
- $src = $vars['src'];
+ if (isset($vars['internalname'])) $name = $vars['internalname'];
+ if (isset($vars['src'])) $src = $vars['src'];
if (strpos($src,$CONFIG->wwwroot)===false) $src = ""; // blank src if trying to access an offsite image.
?>
<input type="<?php echo $type; ?>" class="<?php echo $type; ?>_button" <?php echo $vars['js']; ?> value="<?php echo $value; ?>" src="<?php echo $src; ?>" class="<?php echo $class; ?>" /> \ No newline at end of file
diff --git a/views/default/input/submit.php b/views/default/input/submit.php
index 591a43998..28a0bc5fd 100644
--- a/views/default/input/submit.php
+++ b/views/default/input/submit.php
@@ -19,7 +19,7 @@
*/
$vars['type'] = 'submit';
- $class = $vars['class'];
+ if (isset($vars['class'])) $class = $vars['class'];
if (!$class) $class = "submit_button";
$vars['class'] = $class;