]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - plugins/addlink_toolbar/addlink_toolbar.php
Improve theme dependent plugin placeholders:
[github/shaarli/Shaarli.git] / plugins / addlink_toolbar / addlink_toolbar.php
index cfd74207b031e51eb27ccecb83dc6e0bfd679388..bf8a198a4ed41a44c86320c71117a525f085df7e 100644 (file)
 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;