Added an option to enforce log comments for certain actions

This implements issue #220
This commit is contained in:
Jan Böhmer 2023-04-08 20:43:19 +02:00
parent 5f2408b791
commit 29af14f588
14 changed files with 179 additions and 11 deletions

View file

@ -107,7 +107,6 @@
{{ form_widget(form.save_and_new, {'attr': {'class': 'dropdown-item'}}) }}
<div class="dropdown-divider"></div>
<div class="p-2">
{{ form_row(form.log_comment)}}
</div>
</div>

View file

@ -44,7 +44,9 @@
</button>
<div class="dropdown-menu p-2">
<div class="form-group"><label for="delete_log_comment">{% trans %}edit.log_comment{% endtrans %}</label>
<input type="text" id="delete_log_comment" name="log_comment" class="form-control">
<input type="text" id="delete_log_comment" name="log_comment" class="form-control"
{% if event_comment_needed('part_delete') %}required{% endif %}
>
</div>
</div>
</div>

View file

@ -46,7 +46,7 @@
{% trans %}part.info.withdraw_modal.comment{% endtrans %}
</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="comment" value="">
<input type="text" class="form-control" name="comment" value="" {% if event_comment_needed('part_stock_operation') %}required{% endif %}>
<div id="emailHelp" class="form-text">{% trans %}part.info.withdraw_modal.comment.hint{% endtrans %}</div>
</div>
</div>