Browse Source

replaced request.baseurl with url_for values

joel
Simon Bowie 1 year ago
parent
commit
735996255a
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      web/app/templates/base.html
  2. +2
    -2
      web/app/templates/resources.html

+ 2
- 2
web/app/templates/base.html View File

@@ -16,7 +16,7 @@

<div class="flex">
<a
href="{{ request.base_url }}?view=regular{% for key in request.args %}{% if key != 'view' %}&{{ key }}={{ request.args.get(key) }}{% endif %}{% endfor %}"
href="{{ url_for(request.endpoint) }}?view=regular{% for key in request.args %}{% if key != 'view' %}&{{ key }}={{ request.args.get(key) }}{% endif %}{% endfor %}"
class="block link flex p-3 gap-2 {% if view != 'list' %} active {% endif %}"
>
@@ -32,7 +32,7 @@
Expanded
</a>
<a
href="{{ request.base_url }}?view=list{% for key in request.args %}{% if key != 'view' %}&{{ key }}={{ request.args.get(key) }}{% endif %}{% endfor %}"
href="{{ url_for(request.endpoint) }}?view=list{% for key in request.args %}{% if key != 'view' %}&{{ key }}={{ request.args.get(key) }}{% endif %}{% endfor %}"
class="block link flex p-3 gap-2 {% if view == 'list' %} active {% endif %}"
>
<div class="w-5 h-5 inline-block ">

+ 2
- 2
web/app/templates/resources.html View File

@@ -79,7 +79,7 @@
</div>

<form
action="{{request.base_url}}"
action="{{ url_for(request.endpoint )}}"
method="GET"

hx-trigger="change"
@@ -111,7 +111,7 @@
{{ filter_dropdown_nokey('status', status_filter, 'Maintenance status') }}
{% endif %}
<a href="{{ request.base_url }}?view={{ view }}">Reset</a>
<a href="{{ url_for(request.endpoint) }}?view={{ view }}">Reset</a>
</div>

Loading…
Cancel
Save