blob: d520c1ec8dedc5f79cde64f342e496fcf819775d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
{% extends "ishtar/wizard/default_wizard.html" %}
{% load i18n range table_form %}
{% block wizard_form %}
<script type='text/javascript'>
function update_form(){
if ($('input[name="person_type"]:radio:checked').val() == 'corporation'){
$('#natural_div').hide();
$('#corporation_div').show();
$('#orga-form').show();
} else {
$('#natural_div').show();
$('#corporation_div').hide();
$('#orga-form').hide();
}
}
$(function() {
update_form();
});
</script>
<form action="." method="post" name='wizard'{% if wizard.form.file_upload %} enctype="multipart/form-data"{% endif %}>{% csrf_token %}
<div class='form'>
{% if wizard.form.media %}{{ wizard.form.media }}{% endif %}
{{ wizard.management_form }}
<table class='formset'>
<caption>Statut</caption>
<tr>
<th><label>{% trans "Corporation" %}</label></th>
<td><input type='radio' name='person_type' value='corporation'/></td>
</tr>
<tr>
<th><label>{% trans "Natural person" %}</label></th>
<td><input type='radio' name='person_type' value='natural'/></td>
</tr>
</table>
<table id='corporation_div'>
{% if wizard.form.non_field_errors %}<tr class='errors'>
<td colspan='3'>{{wizard.form.non_field_errors}}</td>
</tr>{%endif%}
{% block corporation %}
{% endblock %}
</table>
<div id='natural_div'>
<table>
{% if wizard.form.non_field_errors %}<tr class='errors'>
<td colspan='3'>{{wizard.form.non_field_errors}}</td>
</tr>{%endif%}
{% block natural %}
{% endblock %}
</table>
</div>
<div>
{% block otherfields %}
{% endblock %}
</div>
{% block extra_head_po %}
{% endblock %}
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
{% block "validation_bar" %}
{% include 'ishtar/wizard/validation_bar.html' %}
{% endblock %}
</div>
</form>
{% endblock %}
|