Skip to content

Commit

Permalink
using IDs twice is not allowed in HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
Augustin-FL committed Dec 27, 2024
1 parent dea9ce1 commit 3922c85
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h3 class="panel-title">{% trans "Notification preferences" %}</h3>
{% for form in forms %}
<div class="col-sm-3">
<div class="form-group mb-3">
<label id="id_business_lines">{{ form.get_notification_display }}</label>
<label for="id_business_lines">{{ form.get_notification_display }}</label>
{{ form.business_lines|add_css_class:"form-control" }}
{% for hidden in form.hidden_fields %}
{{ hidden }}
Expand All @@ -36,4 +36,4 @@ <h3 class="panel-title">{% trans "Notification preferences" %}</h3>
</div>
</div>
</div>
{% endif %}
{% endif %}
18 changes: 9 additions & 9 deletions incidents/templates/events/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,41 +66,41 @@ <h1 class="col-sm-11">{% if i.is_incident %}{% trans "Incident" %}{%else%}{% tra
{% include 'events/_form_errors.html' with errors=form.subject.errors %}
</div>
<div class="col-sm-6 form-group mb-3{% if form.concerned_business_lines.errors%} has-error{%endif%}">
<label id="id_concerned_business_lines">{% trans "Business Lines" %}</label>
<label for="id_concerned_business_lines">{% trans "Business Lines" %}</label>
{{ form.concerned_business_lines|add_css_class:"form-control" }}
{% include 'events/_form_errors.html' with errors=form.concerned_business_lines.errors %}
</div>
</div>
<div class="row">
<div class="col-sm-6 form-group mb-3{% if form.category.errors%} has-error{%endif%}">
<label id="id_category">{% trans "Category" %}</label>
<label for="id_category">{% trans "Category" %}</label>
{{ form.category|add_css_class:"form-control" }}
{% include 'events/_form_errors.html' with errors=form.category.errors %}
</div>
<div class="col-sm-2 form-group mb-3{% if form.status.errors%} has-error{%endif%}">
<label id="id_status">{% trans "Status" %}</label>
<label for="id_status">{% trans "Status" %}</label>
{{ form.status|add_css_class:"form-control" }}
{% include 'events/_form_errors.html' with errors=form.status.errors %}
</div>
<div class="col-sm-2 form-group mb-3{% if form.detection.errors%} has-error{%endif%}">
<label id="id_detection">{% trans "Detection" %}</label>
<label for="id_detection">{% trans "Detection" %}</label>
{{ form.detection|add_css_class:"form-control" }}
{% include 'events/_form_errors.html' with errors=form.detection.errors %}
</div>
<div class="col-sm-2 form-group mb-3{% if form.severity.errors%} has-error{%endif%}">
<label id="id_severity">{% trans "Severity" %}</label>
<label for="id_severity">{% trans "Severity" %}</label>
{{ form.severity|add_css_class:"form-control" }}
{% include 'events/_form_errors.html' with errors=form.severity.errors %}
</div>
</div>
<div class="row">
<div class="col-sm-6 form-group mb-3{% if form.date.errors%} has-error{%endif%}">
<label id="id_date">{% trans "Date / Time" %}</label>
<label for="id_date">{% trans "Date / Time" %}</label>
{{ form.date|add_css_class:"form-control datetime" }}
{% include 'events/_form_errors.html' with errors=form.date.errors %}
</div>
<div class="col-sm-2 form-group mb-3{% if form.confidentiality.errors%} has-error{%endif%}">
<label id="id_confidentiality">{% trans "Confidentiality" %}</label>
<label for="id_confidentiality">{% trans "Confidentiality" %}</label>
{{ form.confidentiality|add_css_class:"form-control" }}
{% include 'events/_form_errors.html' with errors=form.confidentiality.errors %}
</div>
Expand All @@ -123,12 +123,12 @@ <h1 class="col-sm-11">{% if i.is_incident %}{% trans "Incident" %}{%else%}{% tra

<div class="row">
<div class="col-sm-2 form-group mb-3{% if form.actor.errors%} has-error{%endif%}">
<label id="id_actor">{% trans "Actor" %}</label>
<label for="id_actor">{% trans "Actor" %}</label>
{{ form.actor|add_css_class:"form-control" }}
{% include 'events/_form_errors.html' with errors=form.actor.errors %}
</div>
<div class="col-sm-2 form-group mb-3{% if form.plan.errors%} has-error{%endif%}">
<label id="id_plan">{% trans "Plan" %}</label>
<label for="id_plan">{% trans "Plan" %}</label>
{{ form.plan|add_css_class:"form-control" }}
{% include 'events/_form_errors.html' with errors=form.plan.errors %}
</div>
Expand Down

0 comments on commit 3922c85

Please sign in to comment.