Added an checkbox in the withdrawal/move dialog, that if checked automatically deletes a part lot if it becomes empty during the operation

Fixes issue #327
This commit is contained in:
Jan Böhmer 2023-11-25 19:38:08 +01:00
parent 9e69a09a19
commit ffb5d3e790
4 changed files with 35 additions and 7 deletions

View file

@ -62,6 +62,18 @@
<div id="emailHelp" class="form-text">{% trans %}part.info.withdraw_modal.timestamp.hint{% endtrans %}</div>
</div>
</div>
<div class="row mb-2">
<div class="col-sm-9 offset-sm-3">
{# The timestamp must be between a year ago and 1 hour in the future #}
<div class="form-check">
<input class="form-check-input" type="checkbox" name="delete_lot_if_empty" value="true" id="withdraw_modal_delete_if_empty">
<label class="form-check-label" for="withdraw_modal_delete_if_empty">
{% trans %}part.info.withdraw_modal.delete_lot_if_empty{% endtrans %}
</label>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans %}modal.close{% endtrans %}</button>