aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-03-05 12:47:18 +0100
committerMario Vavti <mario@mariovavti.com>2015-03-05 12:47:18 +0100
commit3fa41231611872b79f33469ceec5a8af1a95294d (patch)
tree130d30906a896eba0fa25ad9bfc9af7f442e0ec2
parent61f398e055649b30a343d86d9b63ad785da57d5e (diff)
downloadvolse-hubzilla-3fa41231611872b79f33469ceec5a8af1a95294d.tar.gz
volse-hubzilla-3fa41231611872b79f33469ceec5a8af1a95294d.tar.bz2
volse-hubzilla-3fa41231611872b79f33469ceec5a8af1a95294d.zip
only allow theme selection forms if there are any themes to select
-rw-r--r--mod/settings.php4
-rwxr-xr-xview/tpl/settings_display.tpl5
2 files changed, 6 insertions, 3 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 59a4b1f42..bb0bfacbd 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -848,8 +848,8 @@ function settings_content(&$a) {
'$baseurl' => $a->get_baseurl(true),
'$uid' => local_channel(),
- '$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview'),
- '$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, ''),
+ '$theme' => (($themes) ? array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview') : false),
+ '$mobile_theme' => (($mobile_themes) ? array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, '') : false),
'$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, '', $yes_no),
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
'$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')),
diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl
index 6d4267905..93cee94d6 100755
--- a/view/tpl/settings_display.tpl
+++ b/view/tpl/settings_display.tpl
@@ -3,9 +3,12 @@
<form action="settings/display" id="settings-form" method="post" autocomplete="off" >
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
+{{if $theme}}
{{include file="field_themeselect.tpl" field=$theme}}
+{{/if}}
+{{if $mobile_theme}}
{{include file="field_themeselect.tpl" field=$mobile_theme}}
+{{/if}}
{{if $expert}}
{{include file="field_checkbox.tpl" field=$user_scalable}}
{{/if}}