WIP: Lot groups search/filtering and lot groups panel ui changes #61
|
@ -1,5 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load django_bootstrap5 %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
|
@ -8,13 +9,34 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
Are you sure than want remove the lot {{ object.name }} with {{ object.devices.count }} devices.
|
||||
</div>
|
||||
<div class="card {% if object.devices.count > 0 %}border border-danger{% else %}border border-light{% endif %}">
|
||||
<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>
|
||||
|
||||
{% 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">
|
||||
{% csrf_token %}
|
||||
{% if form.errors %}
|
||||
|
@ -30,8 +52,8 @@
|
|||
{% endif %}
|
||||
{% bootstrap_form form %}
|
||||
<div class="form-actions-no-box">
|
||||
<a class="btn btn-grey" href="{% url 'dashboard:unassigned' %}">{% translate "Cancel" %}</a>
|
||||
<input class="btn btn-green-admin" type="submit" name="submit" value="{% translate 'Delete' %}" />
|
||||
<a class="btn btn-grey" href="{{ request.META.HTTP_REFERER }}">{% translate "Cancel" %}</a>
|
||||
<input class="btn btn-danger" type="submit" name="submit" value="{% translate 'Delete' %}"/>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
Loading…
Reference in a new issue