diff --git a/HideElementsPlugin.php b/HideElementsPlugin.php index bff5b71..59b898f 100644 --- a/HideElementsPlugin.php +++ b/HideElementsPlugin.php @@ -65,8 +65,13 @@ public function hookInitialize() } } - public function hookConfigForm() + /** + * Shows plugin configuration page. + */ + public function hookConfigForm($args) { + $view = $args['view']; + $settings = $this->_settings; $table = get_db()->getTable('Element'); @@ -76,7 +81,13 @@ public function hookConfigForm() ->order('elements.order'); $elements = $table->fetchObjects($select); - include 'config-form.php'; + echo $view->partial( + 'plugins/hide-elements-config-form.php', + array( + 'view' => $view, + 'settings' => $settings, + 'elements' => $elements, + )); } public function hookConfig($args) diff --git a/config-form.php b/views/admin/plugins/hide-elements-config-form.php similarity index 72% rename from config-form.php rename to views/admin/plugins/hide-elements-config-form.php index efcc11f..005e004 100644 --- a/config-form.php +++ b/views/admin/plugins/hide-elements-config-form.php @@ -1,30 +1,35 @@ -
+ +