project/templates/proceedings/submit.html
changeset 94 e86755df35da
parent 92 3743275f7291
child 96 3ece0de11641
equal deleted inserted replaced
92:3743275f7291 94:e86755df35da
     1 {% extends "base.html" %}
     1 {% extends "base.html" %}
     2 {% block title %}Submit Paper for Proceedings{% endblock %}
     2 {% block title %}Submit Paper for Proceedings{% endblock %}
     3 
     3 
     4 {% block addscripts %}
     4 {% block addscripts %}
     5   <script type="text/javascript" src="/static/jquery/jquery-ui-1.7.2.custom.min.js"></script>
     5   <script type="text/javascript" src="/static/jquery/jquery.watermarkinput.js"></script>
     6   <script type="text/javascript" src="/static/jquery/jquery-dynamic-form.js"></script>
     6   <link rel="stylesheet" href="/static/css/autosuggest_inquisitor.css" type="text/css" media="screen" charset="utf-8">
       
     7   <script type="text/javascript" src="/static/jquery/jquery.autosuggest.js"></script>
     7   <script type="text/javascript">
     8   <script type="text/javascript">
     8     $(document).ready(function(){	
     9   /** Init autosuggest on Search Input **/
     9 	  $("#author").dynamicForm("#plus", "#minus", {createColor: 'yellow',removeColor: 'red'});
    10   jQuery(function() {
    10 	});
    11 
       
    12     // Set autosuggest options with all plugins activated
       
    13     var options = {
       
    14       script:"{% url kiwipycon_get_usernames %}?limit=10&",
       
    15       varname:"input",
       
    16       json:true,            // Returned response type
       
    17       shownoresults:true,       // If disable, display nothing if no results
       
    18       noresults:"No Results",     // String displayed when no results
       
    19       maxresults:8,         // Max num results displayed
       
    20       cache:false,          // To enable cache
       
    21       minchars:2,           // Start AJAX request with at leat 2 chars
       
    22       timeout:100000,         // AutoHide in XX ms
       
    23       callback: function (obj) {    // Callback after click or selection   
       
    24         // => TO submit form (general use)
       
    25         //$('#id_authors').val('sucks'); 
       
    26         //$('#form_search_country').submit(); 
       
    27       }
       
    28     };
       
    29     
       
    30     // Init autosuggest
       
    31     var as_json = new bsn.AutoSuggest('id_authors', options);
       
    32     
       
    33     // Display a little watermak  
       
    34     $("#id_authors").Watermark("Ex : alex, guido, travis");
       
    35   });
    11   </script>
    36   </script>
    12 {% endblock %}
    37 {% endblock %}
    13 
    38 
    14 {% block content %}
    39 {% block content %}
    15   <h1>Submit Proceedings paper</h1>
    40   <h1>Submit Proceedings paper</h1>
    16 
    41 
    17   {% include '_errors.html' %}
    42   {% include '_errors.html' %}
    18 
    43 
    19   <form action="{% url kiwipycon_submit_proceedings %}" method="post">
    44   <form action="{% if id %}{% url kiwipycon_submit_proceedings id %}{% else %}{% url kiwipycon_submit_proceedings %}{% endif %}" method="post">
    20     {% if not user.is_authenticated %}
    45     {% if not user.is_authenticated %}
    21     <fieldset>
    46     <fieldset>
    22       <legend>Are you a member of this site?</legend>
    47       <legend>Are you a member of this site?</legend>
    23       <table class="kiwipycon-default required">{{ login_form }}</table>
    48       <table class="kiwipycon-default required">{{ login_form }}</table>
    24       <input type="hidden" name="action" value="login" />
    49       <input type="hidden" name="action" value="login" />
    25       <button class="button left" type="submit">Login</button>
    50       <button class="button left" type="submit">Login</button>
    26     </fieldset>
    51     </fieldset>
    27   </form>
    52   </form>
    28   <br />
    53   <br />
    29   <form action="{% url kiwipycon_submit_talk %}" enctype="multipart/form-data" method="post">
    54   <form action="{% url kiwipycon_submit_proceedings id %}" 
       
    55     enctype="multipart/form-data" method="post">
    30     <fieldset>
    56     <fieldset>
    31       <legend>User Registration</legend>
    57       <legend>User Registration</legend>
    32       <table class="kiwipycon-default required">{{ register_form }}</table>
    58       <table class="kiwipycon-default required">{{ register_form }}</table>
    33       <input type="hidden" name="action" value="register" />
    59       <input type="hidden" name="action" value="register" />
    34     </fieldset>
    60     </fieldset>
    51           <th>{{ proceedings_form.body.label }}</th>
    77           <th>{{ proceedings_form.body.label }}</th>
    52           <td>{{ proceedings_form.body.errors }}{{ proceedings_form.body }}</td>
    78           <td>{{ proceedings_form.body.errors }}{{ proceedings_form.body }}</td>
    53         </tr>
    79         </tr>
    54         <tr>
    80         <tr>
    55           <th>{{ proceedings_form.rst_file.label }}</th>
    81           <th>{{ proceedings_form.rst_file.label }}</th>
    56           <td>{{ proceedings_form.rst_file.errors }}{{ proceedings_form.rst_file }}</td>
    82           <td>{{ proceedings_form.rst_file.errors }}
       
    83               {{ proceedings_form.rst_file }}</td>
    57         </tr>
    84         </tr>
    58         <tr>
    85         <tr>
    59           <th>{{ proceedings_form.authors.label }}</th>
    86           <th>{{ proceedings_form.authors.label }}</th>
    60           <td id="author">
    87           <td>{{ proceedings_form.authors.errors }}
    61             {{ proceedings_form.authors.errors }}
    88               {{ proceedings_form.authors }}</td>
    62             {{ proceedings_form.authors }}
       
    63             <span><a id="minus" href="">[Remove]</a><a id="plus" href="">[Add]</a></span>
       
    64             <br />
       
    65           </td>
       
    66         </tr>
    89         </tr>
    67       </table>
    90       </table>
    68       <button class="button left" type="submit">Submit Paper</button>
    91       <button class="button left" type="submit">Submit Paper</button>
    69     </fieldset>
    92     </fieldset>
    70   </form>
    93   </form>