Fix some problems with password form

This commit is contained in:
2023-06-08 22:26:46 +02:00
parent a3d182d54e
commit ea8d928d42
4 changed files with 20 additions and 18 deletions

View File

@@ -106,11 +106,11 @@ def user_new():
@admin.route(
"/password/<user_id>/<back>",
"/password/<int:user_id>/<back>",
methods=["GET", "POST"],
)
@admin.route(
"/password/<user_id>",
"/password/<int:user_id>",
defaults={"back": "None"},
methods=["GET", "POST"],
)

View File

@@ -35,7 +35,7 @@ def index():
return render_template("index.html", benchmarks=benchmarks)
@main.route("/set_benchmark/<benchmark_id>")
@main.route("/set_benchmark/<int:benchmark_id>")
@login_required
def set_benchmark(benchmark_id):
if int(benchmark_id) == current_user.benchmark_id:

View File

@@ -1,5 +1,6 @@
<div class="container col-md-4 col-sm-4 col-lg-offset-4">
<h5>Benchmarks</h5>
<div class="alert alert-primary" role="alert">
<h5>Select Benchmark</h5>
<div class="list-group">
{% for benchmark in benchmarks %}
<a href="{{ url_for('main.set_benchmark', benchmark_id=benchmark.id) }}"
@@ -12,4 +13,5 @@
</a>
{% endfor %}
</div>
</div>
</div>

View File

@@ -18,10 +18,10 @@
<a href="{{ url_for(config.INDEX) }}"
class="nav-item nav-link nav-benchmark">on {{ current_user.benchmark.name }}</a>
</li>
{% endif %}
<li>{{ render_nav_item('results.select', 'Results') }}</li>
<li>{{ render_nav_item('results.datasets', 'Datasets') }}</li>
<li>{{ render_nav_item('main.config', 'Config') }}</li>
{% endif %}
</ul>
<div class="navbar-nav justify-content-end">
{% if current_user.is_authenticated %}