]> 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
old mode 100755 (executable)
new mode 100644 (file)
index ba3849c..c96a891
 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(
+            '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;
@@ -35,4 +53,4 @@ function hook_addlink_toolbar_render_includes($data)
     }
 
     return $data;
-}
\ No newline at end of file
+}