summaryrefslogtreecommitdiff
path: root/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html')
-rw-r--r--archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html116
1 files changed, 43 insertions, 73 deletions
diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html
index 72dc1d35d..34db944aa 100644
--- a/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html
+++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html
@@ -1,76 +1,48 @@
{% 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>
+{% block form_detail %}
+ <div class="form-row">
+ {% with wizard.form.in_charge as field %}
+ {% include "blocks/bs_field_snippet.html" %}
+ {% endwith %}
+ {% with wizard.form.related_file as field %}
+ {% include "blocks/bs_field_snippet.html" %}
+ {% endwith %}
+ {% with wizard.form.comment as field %}
+ {% include "blocks/bs_field_snippet.html" %}
+ {% endwith %}
-<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.errors}}{{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>{{wizard.form.end_date.errors}}<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}}-instruction_deadline">Date limite d'instruction</label></th>
-</tr>
-{% if saisine_type %}<tr>
- <th><em>{{ saisine_type }}{% if saisine_type_delay %} : délai de {{saisine_type_delay}} jours{% endif %}</em></th>
-</tr>{% endif %}
-<tr class='required'>
- <td>{{wizard.form.instruction_deadline.errors}}{{wizard.form.instruction_deadline|safe}}</td>
-</tr>
-
-<tr class='required'>
- <th><label for="id_instruction-{{CURRENT_ACTION}}-year">{{wizard.form.numeric_reference.label}}</label></th>
-</tr>
-<tr>
- <td>{{wizard.form.numeric_reference.errors}}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 }}
- {% block "footer" %}
- <div id="footer">
- {% block "validation_bar" %}
- {% include 'ishtar/wizard/validation_bar.html' %}
- {% endblock %}
- {% include 'ishtar/blocks/footer.html' %}
+ <div class="form-group col-lg-6">
+ <span class="required">
+ <label class="required">{% trans "State of the file:" %}</label>
+ </span>
+ <div class="form-group col-lg-12 mb-0">
+ <span><input type='radio' name='state' value='open' id='state-open'/>
+ <label for='state-open'>Dossier actif</label></span>
+ </div>
+ <div class="form-group col-lg-12">
+ <span>{{wizard.form.end_date.errors}}<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}}</span>
+ </div>
+ </div>
+ {% with wizard.form.instruction_deadline as field %}{% with saisine_type_message as extra_field_label %}
+ {% include "blocks/bs_field_snippet.html" %}
+ {% endwith %}{% endwith %}
+ <div class="form-group col-lg-6">
+ <span class="required">
+ <label>{{wizard.form.numeric_reference.label}}{% trans ":" %}</label>
+ </span>
+ <div class="form-inline">
+ {{wizard.form.numeric_reference.errors}}
+ {% if FILE_PREFIX %}<span class="pr-2">{{FILE_PREFIX}}</span>{% endif %}
+ <span class="pr-2">{{wizard.form.year|safe}}</span> -
+ <span class="pl-2">{{wizard.form.numeric_reference|safe}}</span>
+ </div>
+ </div>
</div>
- {% endblock %}
-</div>
-</form>
-<script type='text/javascript'>
-$(function(){
+{% endblock %}
+{% block "js_extra_ready" %}
if ($('#id_instruction-{{CURRENT_ACTION}}-end_date').val()){
$("#state-closed").prop('checked', true);
} else {
@@ -96,18 +68,16 @@ $(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.")
+ alert("{% trans 'You must select a closing date.' %}")
return false;
}
return true;
} else if (state == 'open'){
return true;
} else {
- alert("Vous devez choisir un état pour ce dossier.")
+ alert("{% trans 'You must select a state for this file.' %}")
return false;
}
return true;
});
-});
-</script>
-{% endblock %}
+ {% endblock %}