Skip to content

Commit

Permalink
form styling
Browse files Browse the repository at this point in the history
  • Loading branch information
goose-life committed Oct 29, 2024
1 parent 30e1a9a commit 75afdad
Showing 1 changed file with 35 additions and 26 deletions.
61 changes: 35 additions & 26 deletions indigo_app/templates/indigo_app/place/_bulk_approve_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,43 +149,52 @@ <h5 class="card-header">
<a target="_blank" href="{% url 'work' work.frbr_uri %}">{{ work.title }}</a>
<span class="text-muted">{{ work.frbr_uri }}</span>
{% for amendment in amendments %}
<div class="mt-3">
<label for="amendment_task_description_id_{{ amendment.pk }}">
{% blocktrans with amended_title=amendment.amended_work.title amended_numbered_title=amendment.amended_work.numbered_title amending_title=amendment.amending_work.title amending_numbered_title=amendment.amending_work.numbered_title date=amendment.date|date:"Y-m-d" %}
Task description: {{ amended_title }} ({{ amended_numbered_title }}) amended by {{ amending_title }} ({{ amending_numbered_title }}) – {{ date }}
{% endblocktrans %}
</label>
<div class="mt-4">
<div class="form-check">
<input class="form-check-input" type="checkbox" checked
id="amendment_task_create_{{ amendment.pk }}"
name="amendment_task_create_{{ amendment.pk }}">
<label class="form-check-label" for="amendment_task_create_{{ amendment.pk }}">
{% blocktrans with amended_title=amendment.amended_work.title amended_numbered_title=amendment.amended_work.numbered_title amending_title=amendment.amending_work.title amending_numbered_title=amendment.amending_work.numbered_title date=amendment.date|date:"Y-m-d" %}
Create task: {{ amended_title }} ({{ amended_numbered_title }}) amended by {{ amending_title }} ({{ amending_numbered_title }}) – {{ date }}
{% endblocktrans %}
</label>
</div>
{% blocktrans asvar description_default with title=amendment.amending_work.title numbered_title=amendment.amending_work.numbered_title %}
Apply the amendments made by {{ title }} ({{ numbered_title }}) on the given date.

The amendment has already been linked, so start at Step 3 of https://docs.laws.africa/managing-works/amending-works.{% endblocktrans %}
<textarea id="amendment_task_description_id_{{ amendment.pk }}" name="amendment_task_description_{{ amendment.pk }}" class="form-control mt-2" required rows="4"
<textarea name="amendment_task_description_{{ amendment.pk }}" class="form-control mt-2" required rows="3"
>{{ description_default }}</textarea>
<div class="form-check mt-1">
<input class="form-check-input" type="checkbox" id="amendment_task_skip_{{ amendment.pk }}" name="amendment_task_skip_{{ amendment.pk }}">
<label class="form-check-label" for="amendment_task_skip_{{ amendment.pk }}">{% trans "Skip" %}</label>
</div>
{% amendment_date_tasks amendment as potential_duplicates %}
{% for task in potential_duplicates %}
<div class="mt-1"><span title="{% trans 'potential duplicate' %}">
<i class="fas fa-exclamation-triangle text-warning"></i>
<a target="_blank" href="{% url 'task_detail' place=task.place.place_code pk=task.pk %}">#{{ task.pk }}</a>
<i class="fas fa-fw task-icon-{{ task.state }} text-{{ task.state }} small me-2"></i><br/>
{{ task.description }}
</span></div>
{% endfor %}
{% if potential_duplicates %}
<div class="mt-2 ms-3">
<h6>
<i class="fas fa-exclamation-triangle text-warning"></i>
{% trans 'Potential duplicates' %}
</h6>
<ul class="ms-2">
{% for task in potential_duplicates %}
<li>
<a target="_blank" href="{% url 'task_detail' place=task.place.place_code pk=task.pk %}">#{{ task.pk }}</a>
<i class="fas fa-fw task-icon-{{ task.state }} text-{{ task.state }} small me-2" title="{{ task.state }}"></i><br/>
{{ task.description }}
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endfor %}
<div class="mt-3">
{% for opt in form.update_amendment_tasks %}
<div>
{{ opt }}
</div>
{% endfor %}
</div>
<div class="mt-3">
{% for opt in form.update_amendment_tasks %}
<div>
{{ opt }}
</div>
{% endfor %}
</div>
</div>
{% endif %}
Expand Down

0 comments on commit 75afdad

Please sign in to comment.