diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-02-16 02:51:17 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-05-06 15:48:16 +0200 |
commit | d962cfc4de09e28f77433386b98fedfdc258495e (patch) | |
tree | 0d85b96184792c1bacb4170a3e4fceb5f511cf93 /archaeological_files_pdl/templates | |
parent | e38f37b7304027d7eefadae90aaaa919654ac925 (diff) | |
download | Ishtar-d962cfc4de09e28f77433386b98fedfdc258495e.tar.bz2 Ishtar-d962cfc4de09e28f77433386b98fedfdc258495e.zip |
SRA PdL files: raw field for organization (refs #2279)
Diffstat (limited to 'archaeological_files_pdl/templates')
3 files changed, 92 insertions, 27 deletions
diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_generalcontractor.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_generalcontractor.html index 34dc75b08..e43e336c4 100644 --- a/archaeological_files_pdl/templates/ishtar/wizard/wizard_generalcontractor.html +++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_generalcontractor.html @@ -1,31 +1,15 @@ -{% extends "ishtar/wizard/default_wizard.html" %} -{% load i18n range table_form %} -{% block wizard_form %} -<form action="." method="post" name='wizard'{% if wizard.form.file_upload %} enctype="multipart/form-data"{% endif %}>{% csrf_token %} -<div class='form'> -{{ wizard.form.media }} -{{ wizard.management_form }} +{% extends "ishtar/wizard/wizard_person_orga.html" %} -<table class='formset'> - <caption>Statut</caption> - <tr> - <th><label>{% trans "Corporation" %}</label></th> - <td><input type='radio' name='person_type' value='corporation'/></td> +{% block corporation %} + <tr class='required'> + <th>{{ wizard.form.raw_general_contractor.label_tag }}</th> + <td> {{ wizard.form.raw_general_contractor.errors }}{{wizard.form.raw_general_contractor|safe}}</td> </tr> - <tr> - <th><label>{% trans "Natural person" %}</label></th> - <td><input type='radio' name='person_type' value='natural'/></td> - </tr> -</table> - -<table> -{% table_form wizard.form %} -</table> -<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" /> -{{ previous_fields|safe }} -{% block "validation_bar" %} -{% include 'ishtar/wizard/validation_bar.html' %} {% endblock %} -</div> -</form> + +{% block natural %} + <tr class='required'> + <th>{{ wizard.form.general_contractor.label_tag }}</th> + <td> {{ wizard.form.general_contractor.errors }}{{wizard.form.general_contractor|safe}}</td> + </tr> {% endblock %} diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_person_orga.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_person_orga.html new file mode 100644 index 000000000..91dd7e042 --- /dev/null +++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_person_orga.html @@ -0,0 +1,66 @@ +{% 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(); + } else { + $('#natural_div').show(); + $('#corporation_div').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> + +{% block otherfields %} +{% 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 %} + diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_planningservice.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_planningservice.html new file mode 100644 index 000000000..29bc2397c --- /dev/null +++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_planningservice.html @@ -0,0 +1,15 @@ +{% extends "ishtar/wizard/wizard_person_orga.html" %} + +{% block corporation %} + <tr class='required'> + <th>{{ wizard.form.raw_town_planning_service.label_tag }}</th> + <td> {{ wizard.form.raw_town_planning_service.errors }}{{wizard.form.raw_town_planning_service|safe}}</td> + </tr> +{% endblock %} + +{% block natural %} + <tr class='required'> + <th>{{ wizard.form.responsible_town_planning_service.label_tag }}</th> + <td> {{ wizard.form.responsible_town_planning_service.errors }}{{wizard.form.responsible_town_planning_service|safe}}</td> + </tr> +{% endblock %} |