src/polemictweet/templates/create_partner.html
author grandjoncl
Thu, 14 Feb 2013 14:58:12 +0100
changeset 7 be0de27a1c77
permissions -rw-r--r--
modifications in models an forms for the partners and organisators add of css blueprint
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
     1
{% extends "polemictweet_base.html" %}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
     2
{% load i18n %}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
     3
{% load thumbnail %}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
     4
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
     5
	{% block js_import %}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
     6
		<script type="text/javascript" src="{{STATIC_URL}}js/jquery.min.js"></script>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
     7
		<script type="text/javascript" src="{{STATIC_URL}}js/jquery.qtip.min.js"></script>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
     8
		<script type="text/javascript" src="{{STATIC_URL}}js/jquery.formset.js"></script>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
     9
		<script type="text/javascript" src="{{STATIC_URL}}js/add_live.js"></script>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    10
	{% endblock %}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    11
	{% block js_declaration %}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    12
		<script type="text/javascript">
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    13
		
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    14
		// the function stopRKey prevents from the validation of the form if the user tape enter button while entering a field 
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    15
		var $j = jQuery.noConflict(); 
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    16
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    17
		function stopRKey(evt) {
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    18
		      var evt = (evt) ? evt : ((event) ? event : null);
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    19
		      var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    20
		      if ((evt.keyCode == 13) && (node.type=="text"))  {return false;}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    21
		    }
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    22
	
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    23
		document.onkeypress = stopRKey;
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    24
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    25
	 
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    26
		</script>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    27
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    28
		
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    29
		</script>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    30
	{% endblock %}	
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    31
	{% block content %}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    32
	{{ event_form.errors }}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    33
    
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    34
	<div id="add_live_event" class="span-18 last">
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    35
		<div class="projectseventstitle">{% trans "Create a new partner" %}</div>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    36
    
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    37
	<form action="{{ create_partner_action }}" enctype="multipart/form-data" id="my_form" method="POST" enctype="multipart/form-data" >
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    38
	        {% csrf_token %}        
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    39
	        <div class="createpartnerform">
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    40
		        <div id="createpartnerformhidden">
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    41
		            <input type="hidden" name="form_status" value="{{form_status}}" id="partner_form_status" />
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    42
		            {% for hidden in partner_form.hidden_fields %}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    43
		                {{ hidden }}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    44
		            {% endfor %}
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    45
		        </div>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    46
		        <div id="createpartnerformfields" class="span-18 last">
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    47
		        <div>{{ partner_form.name.errors }}{{ partner_form.name.label_tag }}{{partner_form.name}}</div>	
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    48
		        <div>{{ partner_form.url.errors }}{{ partner_form.url.label_tag }}{{partner_form.url}}</div>	
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    49
		        
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    50
		        <table id="choosepartnerpicturecontainer" >
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    51
	
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    52
				    <tr>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    53
				        <td class="leftcolumn">
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    54
				            {% trans "Upload a new picture" %}<br/> (JPG, PNG, &lt;&nbsp;1&nbsp;Mo)
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    55
				        </td>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    56
				        <td>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    57
				        	<div>{{ partner_form.partner_image.errors }}{{partner_form.partner_image.label_tag}}{{partner_form.partner_image}}</div>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    58
				        </td>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    59
				    </tr>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    60
				</table> 
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    61
				 
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    62
		        </div>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    63
	        </div>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    64
    	        
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    65
        <div id="submitevent" class="span-18 last">
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    66
            <div id="submitevent-buttons" class="span-8 last">
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    67
                <button type="submit" value="close" name="submit_button" id="submit_button_close">{% trans 'close_cancel' %}</button>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    68
                <button type="submit" value="write" name="submit_button" id="submit_button_write">{% trans "write" %}</button>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    69
            </div>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    70
        </div>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    71
	
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    72
	</form>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    73
	</div>
be0de27a1c77 modifications in models an forms for the partners and organisators
grandjoncl
parents:
diff changeset
    74
	{% endblock %}