Construct the correct current path, when serving from a subdirectory

This fixes issue #274
This commit is contained in:
Jan Böhmer 2024-10-13 22:49:42 +02:00
parent 0c47aa226c
commit 7145bce605
10 changed files with 12 additions and 12 deletions

View file

@ -17,7 +17,7 @@
<div class="modal-body">
{# non visible form elements #}
<input type="hidden" name="lot_id" value="">
<input type="hidden" name="_redirect" value="{{ app.request.baseUrl ~ app.request.requestUri }}">
<input type="hidden" name="_redirect" value="{{ app.request.baseUrl ~ app.request.pathInfo }}">
<div class="row mb-2">
<label class="form-label">

View file

@ -29,7 +29,7 @@
</table>
<a class="btn btn-success" {% if not is_granted('@projects.edit') %}disabled{% endif %}
href="{{ path('project_add_parts_no_id', {"parts": part.id, "_redirect": app.request.baseUrl ~ app.request.requestUri}) }}">
href="{{ path('project_add_parts_no_id', {"parts": part.id, "_redirect": app.request.baseUrl ~ app.request.pathInfo}) }}">
<i class="fa-solid fa-magnifying-glass-plus fa-fw"></i>
{% trans %}part.info.add_part_to_project{% endtrans %}
</a>

View file

@ -69,7 +69,7 @@
{{ dropdown.profile_dropdown('part', part.id) }}
<a class="btn btn-success mt-2" {% if not is_granted('@projects.edit') %}disabled{% endif %}
href="{{ path('project_add_parts_no_id', {"parts": part.id, "_redirect": app.request.baseUrl ~ app.request.requestUri}) }}">
href="{{ path('project_add_parts_no_id', {"parts": part.id, "_redirect": app.request.baseUrl ~ app.request.pathInfo}) }}">
<i class="fa-solid fa-magnifying-glass-plus fa-fw"></i>
{% trans %}part.info.add_part_to_project{% endtrans %}
</a>

View file

@ -15,7 +15,7 @@
<input type="hidden" name="lot_id" value="">
<input type="hidden" name="action" value="">
<input type="hidden" name="_csfr" value="{{ csrf_token('part_withraw' ~ part.iD) }}">
<input type="hidden" name="_redirect" value="{{ app.request.baseUrl ~ app.request.requestUri }}">
<input type="hidden" name="_redirect" value="{{ app.request.baseUrl ~ app.request.pathInfo }}">
<div class="row mb-2">
<label class="col-form-label col-sm-3">