WIP: Lot groups search/filtering and lot groups panel ui changes #61
|
@ -1,5 +1,6 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load django_bootstrap5 %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -8,13 +9,34 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% load django_bootstrap5 %}
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
Are you sure than want remove the lot {{ object.name }} with {{ object.devices.count }} devices.
|
<div class="card {% if object.devices.count > 0 %}border border-danger{% else %}border border-light{% endif %}">
|
||||||
</div>
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">{% trans "Delete Lot" %}</h5>
|
||||||
|
<div class="card-text mt-4">
|
||||||
|
{% blocktranslate with name=object.name count devices=object.devices.count %}
|
||||||
|
Are you sure you want to remove the lot "{{ name }}" with {{ devices }} device?
|
||||||
|
{% plural %}
|
||||||
|
Are you sure you want to remove the lot "{{ name }}" with {{ devices }} devices?
|
||||||
|
{% endblocktranslate %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if object.devices.count > 0 %}
|
||||||
|
<div class="mt-3 text-danger">
|
||||||
|
<i class="bi bi-exclamation-circle-fill"></i>
|
||||||
|
{% trans "All associated devices will be deassigned." %}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="mt-3 text-muted">
|
||||||
|
<i class="bi bi-info-circle-fill"></i>
|
||||||
|
{% trans "No devices are associated with this lot." %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<form role="form" method="post">
|
<form role="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% if form.errors %}
|
{% if form.errors %}
|
||||||
|
@ -30,8 +52,8 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% bootstrap_form form %}
|
{% bootstrap_form form %}
|
||||||
<div class="form-actions-no-box">
|
<div class="form-actions-no-box">
|
||||||
<a class="btn btn-grey" href="{% url 'dashboard:unassigned' %}">{% translate "Cancel" %}</a>
|
<a class="btn btn-grey" href="{{ request.META.HTTP_REFERER }}">{% translate "Cancel" %}</a>
|
||||||
<input class="btn btn-green-admin" type="submit" name="submit" value="{% translate 'Delete' %}" />
|
<input class="btn btn-danger" type="submit" name="submit" value="{% translate 'Delete' %}"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue