Skip to content

Commit 1309cab

Browse files
FIx default value for new layouts (#13)
1 parent dbeab9a commit 1309cab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

layout_custom_theme.module

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function layout_custom_theme_form_layout_settings_form_alter(&$form, &$form_stat
3434
$form['custom_theme']['enable'] = array(
3535
'#type' => 'checkbox',
3636
'#title' => t('Use custom theme on this layout.'),
37-
'#default_value' => (is_null($config)) ? FALSE : TRUE,
37+
'#default_value' => (empty($config)) ? FALSE : TRUE,
3838
'#access' => !$layout->isDefault(),
3939
);
4040

@@ -46,7 +46,7 @@ function layout_custom_theme_form_layout_settings_form_alter(&$form, &$form_stat
4646
'#title' => 'Custom theme',
4747
'#options' => $options,
4848
'#empty_option' => '- Select theme -',
49-
'#default_value' => (is_null($config)) ? '' : $config,
49+
'#default_value' => (empty($config)) ? '' : $config,
5050
'#states' => array(
5151
'visible' => array(':input[name="custom_theme[enable]"]' => array('checked' => TRUE)),
5252
'required' => array(':input[name="custom_theme[enable]"]' => array('checked' => TRUE)),

0 commit comments

Comments
 (0)