|
94 | 94 | } |
95 | 95 |
|
96 | 96 | $lazy_settings = elgg_view_field([ |
97 | | - '#type' => 'checkbox', |
| 97 | + '#type' => 'switch', |
98 | 98 | '#label' => elgg_echo('widget_manager:settings:lazy_loading:enabled'), |
99 | 99 | '#help' => elgg_echo('widget_manager:settings:lazy_loading:enabled:help'), |
100 | 100 | 'name' => 'params[lazy_loading_enabled]', |
101 | | - 'checked' => (bool) $plugin->lazy_loading_enabled, |
102 | | - 'switch' => true, |
103 | | - 'default' => 0, |
104 | | - 'value' => 1, |
| 101 | + 'value' => $plugin->lazy_loading_enabled, |
105 | 102 | ]); |
106 | 103 |
|
107 | 104 | $lazy_settings .= elgg_view_field([ |
108 | | - '#type' => 'checkbox', |
| 105 | + '#type' => 'switch', |
109 | 106 | '#label' => elgg_echo('widget_manager:settings:lazy_loading:lazy_loading_mobile_columns'), |
110 | 107 | '#help' => elgg_echo('widget_manager:settings:lazy_loading:lazy_loading_mobile_columns:help'), |
111 | 108 | 'name' => 'params[lazy_loading_mobile_columns]', |
112 | | - 'checked' => (bool) $plugin->lazy_loading_mobile_columns, |
113 | | - 'switch' => true, |
114 | | - 'default' => 0, |
115 | | - 'value' => 1, |
| 109 | + 'value' => $plugin->lazy_loading_mobile_columns, |
116 | 110 | ]); |
117 | 111 |
|
118 | 112 | $lazy_settings .= elgg_view_field([ |
|
127 | 121 | echo elgg_view_module('info', elgg_echo('widget_manager:settings:lazy_loading'), $lazy_settings); |
128 | 122 |
|
129 | 123 | $other_settings = elgg_view_field([ |
130 | | - '#type' => 'checkbox', |
| 124 | + '#type' => 'switch', |
131 | 125 | '#label' => elgg_echo('widget_manager:settings:show_collapse_content'), |
132 | 126 | '#help' => elgg_echo('widget_manager:settings:show_collapse_content:help'), |
133 | 127 | 'name' => 'params[show_collapse_content]', |
134 | | - 'checked' => (bool) $plugin->show_collapse_content, |
135 | | - 'switch' => true, |
136 | | - 'default' => 0, |
137 | | - 'value' => 1, |
| 128 | + 'value' => $plugin->show_collapse_content, |
138 | 129 | ]); |
139 | 130 |
|
140 | 131 | echo elgg_view_module('info', elgg_echo('widget_manager:settings:other'), $other_settings); |
0 commit comments