project/templates/proceedings/submit.html
changeset 101 fb27be005a5c
parent 96 3ece0de11641
child 103 852015a7eead
--- a/project/templates/proceedings/submit.html	Tue May 11 03:51:25 2010 +0530
+++ b/project/templates/proceedings/submit.html	Tue Jul 13 01:01:02 2010 +0530
@@ -2,18 +2,18 @@
 {% block title %}Submit Paper for Proceedings{% endblock %}
 
 {% block addscripts %}
-<link rel="stylesheet" href="/static/css/autoSuggest.css" type="text/css" media="screen" charset="utf-8">
-<script type="text/javascript" src="/static/jquery/jquery.autoSuggest.js"></script>
-<script type="text/javascript">
-  $(document).ready(function() {
-    var initial_authors_obj = eval("{{ initial_authors|escapejs }}");
-    $("#id_authors").autoSuggest("{% url kiwipycon_get_usernames %}",
-                                 {minChars: 2, asHtmlID: "authors",
-                                  selectedValuesProp: "name",
-                                  preFill: initial_authors_obj });
-  });
-</script>
-
+  <link rel="stylesheet" type="text/css" href="/static/jquery/jquery.autocomplete.css" />
+  <script type="text/javascript" src="/static/jquery/jquery-ui-1.7.2.custom.min.js"></script>
+  <script type="text/javascript" src="/static/jquery/jquery-dynamic-form.js"></script>
+  <script type="text/javascript" src="/static/jquery/jquery.autocomplete-min.js"></script>
+  <script type="text/javascript">
+    $(document).ready(function(){	
+	  $("#author").dynamicForm("#plus", "#minus", {limit: 10, createColor: 'green',removeColor: 'red'});
+	  var a = $('input[id^=id_authors]').autocomplete({ 
+        serviceUrl:'/proceedings/getusers/', 
+      });
+	});
+  </script>
 {% endblock %}
 
 {% block content %}
@@ -21,7 +21,7 @@
 
   {% include '_errors.html' %}
 
-  <form action="{% if id %}{% url kiwipycon_submit_proceedings id %}{% else %}{% url kiwipycon_submit_proceedings %}{% endif %}" method="post">
+  <form action="{% url kiwipycon_submit_proceedings %}" method="post">
     {% if not user.is_authenticated %}
     <fieldset>
       <legend>Are you a member of this site?</legend>
@@ -31,8 +31,7 @@
     </fieldset>
   </form>
   <br />
-  <form action="{% url kiwipycon_submit_proceedings id %}" 
-    enctype="multipart/form-data" method="post">
+  <form action="{% url kiwipycon_submit_talk %}" enctype="multipart/form-data" method="post">
     <fieldset>
       <legend>User Registration</legend>
       <table class="kiwipycon-default required">{{ register_form }}</table>
@@ -59,13 +58,17 @@
         </tr>
         <tr>
           <th>{{ proceedings_form.rst_file.label }}</th>
-          <td>{{ proceedings_form.rst_file.errors }}
-              {{ proceedings_form.rst_file }}</td>
+          <td>{{ proceedings_form.rst_file.errors }}{{ proceedings_form.rst_file }}</td>
         </tr>
         <tr>
           <th>{{ proceedings_form.authors.label }}</th>
-          <td>{{ proceedings_form.authors.errors }}
-              {{ proceedings_form.authors }}</td>
+          <td>
+            <table style="position: relative; left: -3%;"><tr id="author"><td>
+            {{ proceedings_form.authors.errors }}
+            {{ proceedings_form.authors }}
+            <span><a id="minus" href="">[Remove]</a><a id="plus" href="">[Add]</a></span>
+            </td><tr></table>
+          </td>
         </tr>
       </table>
       <button class="button left" type="submit">Submit Paper</button>