diff options
Diffstat (limited to 'root/add_form')
-rw-r--r-- | root/add_form | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/root/add_form b/root/add_form index 10e83bb..ce0d181 100644 --- a/root/add_form +++ b/root/add_form @@ -1,15 +1,18 @@ -<?xml version="1.0" encoding="utf-8"?> -<html xmlns="http://www.w3.org/1999/xhtml"> +<html> <head> -<title>add</title> +<title>[% IF mode=='edit'; 'Edit link'; ELSE; 'Add link'; END %]</title> +[% c.prototype.auto_complete_stylesheet() %] +[% c.prototype.define_javascript_functions() %] </head> <body> <form action="[% href.add_action() %]" method="post"> <p>Link: <input name="url" type="text" value="[% link.url %]" /></p> <p>Title: <input name="title" type="text" value="[% link.title %]" /></p> <p>Description: <input name="descr" type="text" value="[% link.descr %]" /></p> -<p>Tags: <input name="tag" type="text" value="[% tags.join(' ') %]" /></p> -<input type="submit" /> +<p>Tags: <input autocomplete="off" id="tag_field" name="tag" type="text" value="[% tags.join(' ') %]" /></p> +<div id="tag_field_auto_complete" class="auto_complete"></div> +<script type="text/javascript">new Ajax.Autocompleter('tag_field', 'tag_field_auto_complete', '[% href.tag_autocomplete() %]', { tokens: ' ' })</script> +<input type="submit" name="add" value="Submit" /> [% IF mode=='edit' %]<input type="submit" name="delete" value="Delete" />[% END %] </form> </body> </html>
\ No newline at end of file |