remotes/1693045480750635534/spooky-22
Aevann1 2021-07-26 20:52:00 +02:00
parent 1d6d263a67
commit f00fa33bdd
3 changed files with 6 additions and 4 deletions

View File

@ -119,7 +119,9 @@ def flagged_comments(v):
@app.route("/admin", methods=["GET"])
@admin_level_required(3)
def admin_home(v):
return render_template("admin/admin_home.html", v=v)
with open('./disablesignups', 'r') as f:
x = f.read()
return render_template("admin/admin_home.html", v=v, x=x)
@app.route("/admin/badge_grant", methods=["GET"])
@ -537,7 +539,7 @@ def agendaposter(user_id, v):
else:
return redirect(user.url)
@app.route("/disablesignups", methods=["POST"])
@app.route("/admin/disablesignups", methods=["POST"])
@admin_level_required(6)
@validate_formkey
def disablesignups(v):

View File

@ -30,7 +30,7 @@
{% endfilter %}
{#<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="disablesignups" name="disablesignups" {% if 'DISABLESIGNUPS' | app_config %}checked{% endif %} onchange="post('/disablesignups');">
<input type="checkbox" class="custom-control-input" id="disablesignups" name="disablesignups" {% if x == "yes" %}checked{% endif %} onchange="post('/admin/disablesignups');">
<label class="custom-control-label" for="disablesignups">Disable signups</label>
</div>#}

View File

@ -37,7 +37,7 @@
<a class="nav-link" href="/random/" data-toggle="tooltip" data-placement="bottom" title="Random post"><i class="fas fa-random"></i></a>
</li>
{% if v and v.mods_anything %}
{% if v and v.admin_level==6 %}
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
<a class="nav-link" href="/admin/" data-toggle="tooltip" data-placement="bottom" title="Badmin tools"><i class="fas fa-crown{% if v.has_report_queue %} text-success{% endif %}"></i></a>
</li>