diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-12-30 16:59:44 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-05-06 15:38:32 +0200 |
commit | 25ec2a9794786ac83fa8ce743078305682d8298d (patch) | |
tree | 52e8f0c1333377628b60f0feefad64861980519f /archaeological_files_pdl/templates | |
parent | 155b3890c7938e98f6c1596551260a92041bea68 (diff) | |
download | Ishtar-25ec2a9794786ac83fa8ce743078305682d8298d.tar.bz2 Ishtar-25ec2a9794786ac83fa8ce743078305682d8298d.zip |
Work on new town field (with state and department) - work on new UI for files
Diffstat (limited to 'archaeological_files_pdl/templates')
-rw-r--r-- | archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html | 100 | ||||
-rw-r--r-- | archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html | 77 |
2 files changed, 177 insertions, 0 deletions
diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html new file mode 100644 index 000000000..b47de2cce --- /dev/null +++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html @@ -0,0 +1,100 @@ +{% 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 }} + +<table> + +<tr class='required'> + <th><label for="id_instruction-{{CURRENT_ACTION}}-in_charge">Dossier suivi par</label></th> +</tr> +<tr class='required'> + <td>{{wizard.form.in_charge|safe}}</td> +</tr> + +<tr> + <th><label for="id_instruction-{{CURRENT_ACTION}}-related_file">Dossier lié à</label></th> +</tr> +<tr> + <td>{{wizard.form.related_file|safe}}</td> +</tr> + +<tr> + <th><label for="id_instruction-{{CURRENT_ACTION}}-comment">Commentaire</label></th> +</tr> +<tr> + <td>{{wizard.form.comment|safe}}</td> +</tr> + +<tr class='required'> + <th><label>État du dossier</label></th> +</tr> +<tr> + <td><input type='radio' name='state' value='open' id='state-open'/> <label for='state-open'>Dossier actif</label></td> +</tr> +<tr> + <td><input type='radio' name='state' value='closed' id='state-closed'/> <label for='state-closed'>Dossier clos / date de clôture</label> : {{wizard.form.end_date|safe}}</td> +</tr> + +<tr class='required'> + <th><label for="id_instruction-{{CURRENT_ACTION}}-year">{{wizard.form.numeric_reference.label}}</label></th> +</tr> +<tr> + <td>SRA <span class='small'>{{wizard.form.year|safe}}</span> - <span class='small'>{{wizard.form.numeric_reference|safe}}</span></td> +</tr> +</table> + +<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" /> +{{ previous_fields|safe }} +<div id='validation-bar'> + <input type="submit" id="submit_form" name='validate' value="{% trans "Validate" %}"/> + {% if next_steps %}<input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans "Validate and end" %}"/>{% endif %} +</div> +</div> +</form> +<script type='text/javascript'> +$(function(){ + + if ($('#id_instruction-{{CURRENT_ACTION}}-end_date').val()){ + $("#state-closed").prop('checked', true); + } else { + $("#state-open").prop('checked', true); + } + + check_state = function(){ + var state = $("input[name=state]:checked").val(); + if (state == 'closed'){ + $('#id_instruction-{{CURRENT_ACTION}}-end_date').focus(); + $('#id_instruction-{{CURRENT_ACTION}}-end_date').prop('disabled', false); + } else if (state == 'open'){ + $('#id_instruction-{{CURRENT_ACTION}}-end_date').val(''); + $('#id_instruction-{{CURRENT_ACTION}}-end_date').prop('disabled', true); + } + }; + + $('input[name=state]').click(check_state); + + check_state(); + + $('#submit_form').click(function(){ + var state = $("input[name=state]:checked").val(); + if (state == 'closed'){ + if (!$('#id_instruction-{{CURRENT_ACTION}}-end_date').val()){ + alert("Vous devez sélectionner une date de clôture.") + return false; + } + return true; + } else if (state == 'open'){ + return true; + } else { + alert("Vous devez choisir un état pour ce dossier.") + return false; + } + return true; + }); +}); +</script> +{% endblock %} diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html new file mode 100644 index 000000000..41527629d --- /dev/null +++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html @@ -0,0 +1,77 @@ +{% 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 }} + +<table> + +<tr class='required'> + <th><label for="id_preventiveplanning-{{CURRENT_ACTION}}-name">Nom de l'aménagement</label></th> +</tr> +<tr class='required'> + <td>{{wizard.form.name|safe}}</td> +</tr> + +</table> + +<h4>Localisation</h4> +<table> + +<tr> + <td>{{wizard.form.main_town|safe}}</td> +</tr> + +<tr> + <th colspan='2'><label for="id_preventiveplanning-{{CURRENT_ACTION}}-locality">Lieu-dit</label></th> +</tr> +<tr> + <td colspan='2'>{{wizard.form.locality|safe}}</td> +</tr> + +<tr> + <th colspan='2'><label for="id_preventiveplanning-{{CURRENT_ACTION}}-address">Adresse</label></th> +</tr> +<tr> + <td colspan='2'>{{wizard.form.address|safe}}</td> +</tr> + +<tr> + <th colspan='2'><label for="id_preventiveplanning-{{CURRENT_ACTION}}-postal_code">Code postal</label></th> +</tr> +<tr> + <td colspan='2'>{{wizard.form.postal_code|safe}}</td> +</tr> + +</table> + +<h4>Surfaces</h4> +<table> + +<tr> + <th><label for="id_preventiveplanning-{{CURRENT_ACTION}}-total_surface">Surface totale des terrains</label></th> +</tr> +<tr> + <td>{{wizard.form.total_surface|safe}}</td> +</tr> + +<tr> + <th><label for="id_preventiveplanning-{{CURRENT_ACTION}}-total_developed_surface">Surface totale aménagée</label></th> +</tr> +<tr> + <td>{{wizard.form.total_developed_surface|safe}}</td> +</tr> + +</table> + +<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" /> +{{ previous_fields|safe }} +<div id='validation-bar'> + <input type="submit" id="submit_form" name='validate' value="{% trans "Validate" %}"/> + {% if next_steps %}<input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans "Validate and end" %}"/>{% endif %} +</div> +</div> +</form> +{% endblock %} |