summaryrefslogtreecommitdiff
path: root/app/views/configure/display.phtml
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-01-23 18:03:44 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-01-23 18:03:44 +0100
commit4985e457eb004a4455148802a52ad14d81e7276f (patch)
treecb561da3b15cc333977edf6ad8506aa04995a361 /app/views/configure/display.phtml
parent3eb5d216f3dd2a18427a62ea52f256b03a1027c7 (diff)
N'affiche <option></option> que lorsque nécessaire
Corrige https://github.com/marienfressinaud/FreshRSS/issues/372
Diffstat (limited to 'app/views/configure/display.phtml')
-rw-r--r--app/views/configure/display.phtml19
1 files changed, 11 insertions, 8 deletions
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 725356c8d..9104e4ef1 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -21,14 +21,17 @@
<div class="form-group">
<label class="group-name" for="theme"><?php echo Minz_Translate::t ('theme'); ?></label>
<div class="group-controls">
- <select name="theme" id="theme" required="">
- <option></option>
- <?php foreach ($this->themes as $theme) { ?>
- <option value="<?php echo $theme['id']; ?>"<?php echo $this->conf->theme === $theme['id'] ? ' selected="selected"' : ''; ?>>
- <?php echo $theme['name'] . ' — ' . Minz_Translate::t ('by') . ' ' . $theme['author']; ?>
- </option>
- <?php } ?>
- </select>
+ <select name="theme" id="theme" required=""><?php
+ $found = false;
+ foreach ($this->themes as $theme) {
+ ?><option value="<?php echo $theme['id']; ?>"<?php if ($this->conf->theme === $theme['id']) { echo ' selected="selected"'; $found = true; } ?>><?php
+ echo $theme['name'] . ' — ' . Minz_Translate::t ('by') . ' ' . $theme['author'];
+ ?></option><?php
+ }
+ if (!$found) {
+ ?><option selected="selected"></option><?php
+ }
+ ?></select>
</div>
</div>