Revision 8bab524e
Added by Phil Davis about 9 years ago
src/usr/local/www/index.php | ||
---|---|---|
155 | 155 |
|
156 | 156 |
if ($_POST && $_POST['sequence']) { |
157 | 157 |
|
158 |
$config['widgets']['sequence'] = rtrim($_POST['sequence'], ','); |
|
158 |
$widget_settings = array(); |
|
159 |
$widget_settings['sequence'] = rtrim($_POST['sequence'], ','); |
|
159 | 160 |
|
160 | 161 |
foreach ($widgets as $widgetname => $widgetconfig) { |
161 | 162 |
if ($_POST[$widgetname . '-config']) { |
162 |
$config['widgets'][$widgetname . '-config'] = $_POST[$widgetname . '-config'];
|
|
163 |
$widget_settings[$widgetname . '-config'] = $_POST[$widgetname . '-config'];
|
|
163 | 164 |
} |
164 | 165 |
} |
165 | 166 |
|
166 |
write_config(gettext("Widget configuration has been changed."));
|
|
167 |
save_widget_settings($_SESSION['Username'], $widget_settings);
|
|
167 | 168 |
header("Location: /"); |
168 | 169 |
exit; |
169 | 170 |
} |
... | ... | |
251 | 252 |
} |
252 | 253 |
|
253 | 254 |
##build widget saved list information |
254 |
if ($config['widgets'] && $config['widgets']['sequence'] != "") {
|
|
255 |
$dashboardcolumns = isset($config['system']['webgui']['dashboardcolumns']) ? $config['system']['webgui']['dashboardcolumns'] : 2;
|
|
256 |
$pconfig['sequence'] = $config['widgets']['sequence'];
|
|
255 |
if ($user_settings['widgets']['sequence'] != "") {
|
|
256 |
$dashboardcolumns = isset($user_settings['webgui']['dashboardcolumns']) ? $user_settings['webgui']['dashboardcolumns'] : 2;
|
|
257 |
$pconfig['sequence'] = $user_settings['widgets']['sequence'];
|
|
257 | 258 |
$widgetsfromconfig = array(); |
258 | 259 |
|
259 | 260 |
foreach (explode(',', $pconfig['sequence']) as $line) { |
... | ... | |
307 | 308 |
} |
308 | 309 |
|
309 | 310 |
## Get the configured options for Show/Hide available widgets panel. |
310 |
$dashboard_available_widgets_hidden = isset($config['system']['webgui']['dashboardavailablewidgetspanel']) ? false : true;
|
|
311 |
$dashboard_available_widgets_hidden = !$user_settings['webgui']['dashboardavailablewidgetspanel'];
|
|
311 | 312 |
|
312 | 313 |
if ($dashboard_available_widgets_hidden) { |
313 | 314 |
$panel_state = 'out'; |
Also available in: Unified diff
Feature #6388 custom GUI preference settings per user