diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-10-23 10:53:26 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-10-23 10:53:26 -0700 |
commit | 5d38476faf775ce6c639d20bc685a7117d29b8f5 (patch) | |
tree | 80d28d69e5a066ba5f2e10d108175813d9432c0f /views/installation/input/dropdown.php | |
parent | f1be73852439f5eb7a9f6fdf1e9587f7b2346f69 (diff) | |
parent | a18ba9dad699ca785e4d8fc37a5fe95a060584e0 (diff) | |
download | elgg-5d38476faf775ce6c639d20bc685a7117d29b8f5.tar.gz elgg-5d38476faf775ce6c639d20bc685a7117d29b8f5.tar.bz2 |
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'views/installation/input/dropdown.php')
-rw-r--r-- | views/installation/input/dropdown.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/views/installation/input/dropdown.php b/views/installation/input/dropdown.php index 46e15c657..cf875492e 100644 --- a/views/installation/input/dropdown.php +++ b/views/installation/input/dropdown.php @@ -10,16 +10,13 @@ * the value displayed on the button. Replaces $vars['options'] when defined. */ +$class = "elgg-input-dropdown"; -$class = $vars['class']; -if (!$class) { - $class = "elgg-input-dropdown"; -} ?> -<select name="<?php echo $vars['name']; ?>" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>"> +<select name="<?php echo $vars['name']; ?>" class="<?php echo $class; ?>"> <?php -if ($vars['options_values']) { - foreach($vars['options_values'] as $value => $option) { +if (isset($vars['options_values'])) { + foreach ($vars['options_values'] as $value => $option) { if ($value != $vars['value']) { echo "<option value=\"$value\">{$option}</option>"; } else { @@ -27,7 +24,7 @@ if ($vars['options_values']) { } } } else { - foreach($vars['options'] as $option) { + foreach ($vars['options'] as $option) { if ($option != $vars['value']) { echo "<option>{$option}</option>"; } else { @@ -36,4 +33,4 @@ if ($vars['options_values']) { } } ?> -</select>
\ No newline at end of file +</select> |