Ingredients auto complete, adding ingredients works. Some template tweaks.
[~kgodey/maayanwich.git] / templates / sandwich.html
1 {% extends "base.html" %}
2 {% block extrahead %}
3 <script type="text/javascript" src="http://127.0.0.1:8000/sandwiches/jquery-1.4.2.min.js"></script>
4 <script type="text/javascript" src="http://127.0.0.1:8000/sandwiches/jquery.tokeninput.js"></script>
5 <link rel="stylesheet" href="http://127.0.0.1:8000/sandwiches/token-input.css" type="text/css" />
6 <script type="text/javascript">
7 $(document).ready(function () {
8   $("#id_ing").tokenInput("/ajaxfun/", {
9         hintText: "Type an ingredient!",
10         noResultsText: "No ingredients!",
11         searchingText: "Searching..."
12 });
13 });
14 </script>
15 {% endblock %}
16 {% block title %}Add a sandwich{% endblock %}
17 {% block content %}
18         <h1 class="pagetitle">Add a new sandwich</h1>
19         <span class="formspan">
20         <form enctype="multipart/form-data" action="{% url add_sandwich %}" method="post" class="cssform">
21         {{ sform.as_p }}
22         <p><label for="id_ing">Ingredients:</label> <input id="id_ing" type="text" name="ing"/></p>
23         <input type="submit" value="Submit" />
24         </form>
25         </span>
26 {% endblock %}