diff --git a/src/Backend.php b/src/Backend.php index 6ef163c..ba453c8 100644 --- a/src/Backend.php +++ b/src/Backend.php @@ -113,10 +113,15 @@ class Backend extends dcNsProcess echo '
' . '

' . Html::escapeHTML(My::name()) . '

' . - (new Para())->items([ - (new Checkbox('dcLatestVersionsItems', (bool) dcCore::app()->auth->user_prefs->get('dashboard')->get('dcLatestVersionsItems')))->value(1), - (new Label(__("Show Dotclear's latest versions on dashboards."), Label::OUTSIDE_LABEL_AFTER))->for('dcLatestVersionsItems')->class('classic'), - ])->render() . + (new Para()) + ->__call('items', [[ + (new Checkbox('dcLatestVersionsItems', (bool) dcCore::app()->auth->user_prefs->get('dashboard')->get('dcLatestVersionsItems'))) + ->__call('value', [1]), + (new Label(__("Show Dotclear's latest versions on dashboards."), Label::OUTSIDE_LABEL_AFTER)) + ->__call('for', ['dcLatestVersionsItems']) + ->__call('class', ['classic']), + ]]) + ->render() . '
'; }, diff --git a/src/Widgets.php b/src/Widgets.php index ad820d8..47200dc 100644 --- a/src/Widgets.php +++ b/src/Widgets.php @@ -49,7 +49,7 @@ class Widgets public static function parseWidget(WidgetsElement $w): string { - if ($w->offline || !$w->checkHomeOnly(dcCore::app()->url->type) || $w->text == '') { + if ($w->__get('offline') || !$w->checkHomeOnly(dcCore::app()->url->type) || $w->__get('text') == '') { return ''; } @@ -93,7 +93,7 @@ class Widgets $updater->getVersion(), $updater->getFileURL(), ], - $w->text + $w->__get('text') )); } @@ -103,10 +103,10 @@ class Widgets # Display return $w->renderDiv( - (bool) $w->content_only, - 'dclatestversionswidget ' . $w->class, + (bool) $w->__get('content_only'), + 'dclatestversionswidget ' . $w->__get('class'), '', - ($w->title ? $w->renderTitle(Html::escapeHTML($w->title)) : '') . sprintf('', implode('', $li)) + ($w->__get('title') ? $w->renderTitle(Html::escapeHTML($w->__get('title'))) : '') . sprintf('', implode('', $li)) ); } }