From ba0fd80732acbff0fcda57a0b31e4edfaa337001 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 1 Dec 2016 11:38:21 +0100 Subject: Improve theme dependent plugin placeholders: - buttons_toolbar: now expect links represented by an array instead of HTML content - fields_toolbar: now expect a form represented by an array instead of HTML content - action_plugin: now expect links represented by an array instead of HTML content Default templates updated accordingly mprove theme dependent plugin placeholders: --- plugins/addlink_toolbar/addlink_toolbar.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'plugins/addlink_toolbar/addlink_toolbar.php') diff --git a/plugins/addlink_toolbar/addlink_toolbar.php b/plugins/addlink_toolbar/addlink_toolbar.php index cfd74207..bf8a198a 100644 --- a/plugins/addlink_toolbar/addlink_toolbar.php +++ b/plugins/addlink_toolbar/addlink_toolbar.php @@ -15,7 +15,27 @@ function hook_addlink_toolbar_render_header($data) { if ($data['_PAGE_'] == Router::$PAGE_LINKLIST && $data['_LOGGEDIN_'] === true) { - $data['fields_toolbar'][] = file_get_contents(PluginManager::$PLUGINS_PATH . '/addlink_toolbar/addlink_toolbar.html'); + $form = array( + 'attr' => array( + 'method' => 'GET', + 'action' => '', + 'name' => 'addform', + 'class' => 'addform', + ), + 'inputs' => array( + array( + 'type' => 'text', + 'name' => 'post', + 'placeholder' => 'URI', + ), + array( + 'type' => 'submit', + 'value' => 'Add link', + 'class' => 'bigbutton', + ), + ), + ); + $data['fields_toolbar'][] = $form; } return $data; -- cgit v1.2.3