mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 09:44:41 +02:00
Use relative path in templates instead of full pathes
This fixes problems with HTTP/HTTPS mixing
This commit is contained in:
parent
4c4b610daa
commit
92e477775a
9 changed files with 14 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
|||
{% import "components/datatables.macro.html.twig" as datatables %}
|
||||
|
||||
<form method="post" action="{{ url("log_undo") }}"
|
||||
<form method="post" action="{{ path("log_undo") }}"
|
||||
{{ stimulus_controller('elements/delete_btn') }} {{ stimulus_action('elements/delete_btn', "submit", "submit") }}
|
||||
data-delete-title="{% trans %}log.undo.confirm_title{% endtrans %}"
|
||||
data-delete-message="{% trans %}log.undo.confirm_message{% endtrans %}">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<a href="{{ url('part_new', url_options) }}" class="btn btn-success float-start {% if not is_granted("@parts.create") or (entity is defined and entity.notSelectable) %}disabled{% endif %}"><i class="fas fa-plus-square fa-fw"></i>
|
||||
<a href="{{ path('part_new', url_options) }}" class="btn btn-success float-start {% if not is_granted("@parts.create") or (entity is defined and entity.notSelectable) %}disabled{% endif %}"><i class="fas fa-plus-square fa-fw"></i>
|
||||
{% trans%}part.create.btn{% endtrans %}</a>
|
||||
</div>
|
||||
</div>
|
|
@ -96,7 +96,7 @@
|
|||
<p><b>{% trans %}tfa_backup.generation_date{% endtrans %}:</b> {{ user.backupCodesGenerationDate | format_datetime }}</p>
|
||||
</div>
|
||||
<div class="offset-sm-3">
|
||||
<a href="{{ url('show_backup_codes') }}" target="_blank" data-turbo="false" class="btn btn-primary">{% trans %}tfa_backup.show_codes{% endtrans %}</a>
|
||||
<a href="{{ path('show_backup_codes') }}" target="_blank" data-turbo="false" class="btn btn-primary">{% trans %}tfa_backup.show_codes{% endtrans %}</a>
|
||||
</div>
|
||||
|
||||
<div class="offset-sm-3 mt-2">
|
||||
|
@ -112,7 +112,7 @@
|
|||
|
||||
{% if user.u2FKeys is not empty %}
|
||||
<b>{% trans %}tfa_u2f.table_caption{% endtrans %}:</b>
|
||||
<form action="{{ url('u2f_delete') }}" method="post"
|
||||
<form action="{{ path('u2f_delete') }}" method="post"
|
||||
{{ stimulus_controller('elements/delete_btn') }} {{ stimulus_action('elements/delete_btn', "submit", "submit") }}
|
||||
data-delete-title="{% trans %}tfa_u2f.delete_u2f.confirm_title{% endtrans %}"
|
||||
data-delete-message="{% trans %}tfa_u2f.delete_u2f.confirm_message{% endtrans %}">
|
||||
|
@ -143,12 +143,12 @@
|
|||
<p><b>{% trans %}tfa_u2f.no_keys_registered{% endtrans %}</b></p>
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ url('club_base_register_u2f') }}" class="btn btn-success"><i class="fas fa-plus-square fa-fw"></i> {% trans %}tfa_u2f.add_new_key{% endtrans %}</a>
|
||||
<a href="{{ path('club_base_register_u2f') }}" class="btn btn-success"><i class="fas fa-plus-square fa-fw"></i> {% trans %}tfa_u2f.add_new_key{% endtrans %}</a>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="tfa-trustedDevices" role="tabpanel" aria-labelledby="trustedDevices-tab-tab">
|
||||
<p>{% trans %}tfa_trustedDevices.explanation{% endtrans %}</p>
|
||||
<form action="{{ url('tfa_trustedDevices_invalidate') }}" method="post"
|
||||
<form action="{{ path('tfa_trustedDevices_invalidate') }}" method="post"
|
||||
{{ stimulus_controller('elements/delete_btn') }} {{ stimulus_action('elements/delete_btn', "submit", "submit") }}
|
||||
data-delete-title="{% trans %}tfa_trustedDevices.invalidate.confirm_title{% endtrans %}"
|
||||
data-delete-message="{% trans %}tfa_trustedDevices.invalidate.confirm_message{% endtrans %}">
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
{% if is_granted("@tools.label_scanner") %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link"
|
||||
href="{{ url("scan_dialog") }}">{% trans %}navbar.scanner.link{% endtrans %}</a>
|
||||
href="{{ path("scan_dialog") }}">{% trans %}navbar.scanner.link{% endtrans %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form action="{{ url('parts_search') }}" class="d-flex my-lg-0 ms-auto" method="get">
|
||||
<form action="{{ path('parts_search') }}" class="d-flex my-lg-0 ms-auto" method="get">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-light dropdown-toggle my-2" type="button" id="navbar-search-options" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-bs-auto-close="false">
|
||||
{% trans %}search.options.label{% endtrans %}
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
{% endif %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body data-base-url="{{ url('homepage', {'_locale': app.request.locale}) }}" data-locale="{{ app.request.locale|default("en")|slice(0,2) }}">
|
||||
<body data-base-url="{{ path('homepage', {'_locale': app.request.locale}) }}" data-locale="{{ app.request.locale|default("en")|slice(0,2) }}">
|
||||
{% block body %}
|
||||
<header>
|
||||
<turbo-frame id="navbar-frame" target="content" data-turbo-action="advance" data-turbo-permanent>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
{% macro string_to_tags(string, class="badge bg-info") %}
|
||||
{% for tag in string|split(',') %}
|
||||
<a href="{{ url('part_list_tags', {'tag': tag | trim | url_encode}) }}" class="{{ class }}" >{{ tag | trim }}</a>
|
||||
<a href="{{ path('part_list_tags', {'tag': tag | trim | url_encode}) }}" class="{{ class }}" >{{ tag | trim }}</a>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
||||
|
@ -110,9 +110,9 @@
|
|||
|
||||
{% if user is not null %}
|
||||
{% if user.fullName is not empty %}
|
||||
<a href="{{ url('user_info', {"id": user.id}) }}" title="@{{ user.name }}"><i>({{ user.fullName }})</i></a>
|
||||
<a href="{{ path('user_info', {"id": user.id}) }}" title="@{{ user.name }}"><i>({{ user.fullName }})</i></a>
|
||||
{% else %}
|
||||
<a href="{{ url('user_info', {"id": user.id}) }}" title="@{{ user.name }}"><i>(@{{ user.name }})</i></a>
|
||||
<a href="{{ path('user_info', {"id": user.id}) }}" title="@{{ user.name }}"><i>(@{{ user.name }})</i></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
@ -24,5 +24,5 @@
|
|||
<div id="u2fError" style="display: none;" class="text-center h4"></div>
|
||||
</form>
|
||||
|
||||
<a href="{{ url('user_settings') }}">{% trans %}tfa_u2f.add_key.back_to_settings{% endtrans %}</a>
|
||||
<a href="{{ path('user_settings') }}">{% trans %}tfa_u2f.add_key.back_to_settings{% endtrans %}</a>
|
||||
{% endblock %}
|
||||
|
|
|
@ -61,6 +61,6 @@
|
|||
</form>
|
||||
|
||||
{% if allow_email_pw_reset %}
|
||||
<a class="offset-sm-2" href="{{ url('pw_reset_request') }}">{% trans %}pw_reset.password_forget{% endtrans %}</a>
|
||||
<a class="offset-sm-2" href="{{ path('pw_reset_request') }}">{% trans %}pw_reset.password_forget{% endtrans %}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue