Allow to specify an informational field during a part stock operation, where the user can specify, when this operation was really performed

Fixes issue #416
This commit is contained in:
Jan Böhmer 2023-11-25 19:10:18 +01:00
parent 6cff19358a
commit b447a69dae
6 changed files with 89 additions and 16 deletions

View file

@ -50,6 +50,18 @@
<div id="emailHelp" class="form-text">{% trans %}part.info.withdraw_modal.comment.hint{% endtrans %}</div>
</div>
</div>
<div class="row mb-2">
<label class="col-form-label col-sm-3">
{% trans %}part.info.withdraw_modal.timestamp{% endtrans %}
</label>
<div class="col-sm-9">
{# The timestamp must be between a year ago and 1 hour in the future #}
<input type="datetime-local" class="form-control" name="timestamp" value=""
max="{{ "+10mins"|date('Y-m-d\\TH:i') }}" min="{{ "-1year"|date('Y-m-d\\TH:i') }}">
<div id="emailHelp" class="form-text">{% trans %}part.info.withdraw_modal.timestamp.hint{% endtrans %}</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans %}modal.close{% endtrans %}</button>