Initial shenanigans on storing my overly fancy EC form

This commit is contained in:
2020-08-24 17:25:25 +01:00
parent da60cad911
commit 8bb08724b6
9 changed files with 183 additions and 110 deletions

View File

@@ -16,30 +16,6 @@
<div class="card-header">General</div>
<div class="card-body">
<dl class="row">
<dt class="col-10">{{ object|help_text:'nonstandard_equipment' }}</dt>
<dd class="col-2">
{{ object.nonstandard_equipment|yesno|title }}
</dd>
<dt class="col-10">{{ object|help_text:'nonstandard_use'|safe }}</dt>
<dd class="col-2">
{{ object.nonstandard_use|yesno|title }}
</dd>
<dt class="col-10">{{ object|help_text:'contractors' }}</dt>
<dd class="col-2">
{{ object.contractors|yesno|title }}
</dd>
<dt class="col-10">{{ object|help_text:'other_companies' }}</dt>
<dd class="col-2">
{{ object.othercompanies|yesno|title }}
</dd>
<dt class="col-10">{{ object|help_text:'crew_fatigue' }}</dt>
<dd class="col-2">
{{ object.crewfatigue|yesno|title }}
</dd>
<dt class="col-12">{{ object|help_text:'general_notes' }}</dt>
<dd class="col-12">
{{ object.general_notes|default:'N/A'|linebreaks }}
</dd>
</dl>
</div>
</div>
@@ -47,34 +23,6 @@
<div class="card-header">Power</div>
<div class="card-body">
<dl class="row">
<dt class="col-sm-6">{{ object|help_text:'big_power' }}</dt>
<dd class="col-sm-6">
{{ object.big_power|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'power_mic' }}</dt>
<dd class="col-sm-6">
{{ object.power_mic.name|default:'None' }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'generators' }}</dt>
<dd class="col-sm-6">
{{ object.generators|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'other_companies_power' }}</dt>
<dd class="col-sm-6">
{{ object.other_companies_power|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'nonstandard_equipment_power' }}</dt>
<dd class="col-sm-6">
{{ object.nonstandard_equipment_power|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'multiple_electrical_environments' }}</dt>
<dd class="col-sm-6">
{{ object.multiple_electrical_environments|yesno|title }}
</dd>
<dt class="col-12">{{ object|help_text:'power_notes' }}</dt>
<dd class="col-12">
{{ object.power_notes|default:'N/A'|linebreaks }}
</dd>
</dl>
</div>
</div>
@@ -82,14 +30,6 @@
<div class="card-header">Sound</div>
<div class="card-body">
<dl class="row">
<dt class="col-sm-6">{{ object|help_text:'noise_monitoring' }}</dt>
<dd class="col-sm-6">
{{ object.noise_monitoring|yesno|title }}
</dd>
<dt class="col-12">{{ object|help_text:'sound_notes' }}</dt>
<dd class="col-12">
{{ object.sound_notes|default:'N/A'|linebreaks }}
</dd>
</dl>
</div>
</div>
@@ -97,50 +37,12 @@
<div class="card-header">Site Details</div>
<div class="card-body">
<dl class="row">
<dt class="col-sm-6">{{ object|help_text:'known_venue' }}</dt>
<dd class="col-sm-6">
{{ object.known_venue|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'safe_loading'|safe }}</dt>
<dd class="col-sm-6">
{{ object.safe_loading.name|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'safe_storage' }}</dt>
<dd class="col-sm-6">
{{ object.safe_storage|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'area_outside_of_control' }}</dt>
<dd class="col-sm-6">
{{ object.area_outside_of_control|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'barrier_required' }}</dt>
<dd class="col-sm-6">
{{ object.barrier_required|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'nonstandard_emergency_procedure' }}</dt>
<dd class="col-sm-6">
{{ object.nonstandard_emergency_procedure|yesno|title }}
</dd>
</dl>
</div>
</div>
<div class="card card-default mb-3">
<div class="card-header">Structures</div>
<div class="card-body">
<dl class="row">
<dt class="col-sm-6">{{ object|help_text:'special_structures' }}</dt>
<dd class="col-sm-6">
{{ object.special_structures|yesno|title }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'persons_responsible_structures' }}</dt>
<dd class="col-sm-6">
{{ object.persons_responsible_structures.name|default:'N/A'|linebreaks }}
</dd>
<dt class="col-sm-6">{{ object|help_text:'suspended_structures' }}</dt>
<dd class="col-sm-6">
{{ object.suspended_structures|yesno|title }}
</dd>
</dl>
</div>
</div>
</div>