forked from rDrama/rDrama
dfdf
parent
1d6d263a67
commit
f00fa33bdd
|
@ -119,7 +119,9 @@ def flagged_comments(v):
|
||||||
@app.route("/admin", methods=["GET"])
|
@app.route("/admin", methods=["GET"])
|
||||||
@admin_level_required(3)
|
@admin_level_required(3)
|
||||||
def admin_home(v):
|
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"])
|
@app.route("/admin/badge_grant", methods=["GET"])
|
||||||
|
@ -537,7 +539,7 @@ def agendaposter(user_id, v):
|
||||||
else:
|
else:
|
||||||
return redirect(user.url)
|
return redirect(user.url)
|
||||||
|
|
||||||
@app.route("/disablesignups", methods=["POST"])
|
@app.route("/admin/disablesignups", methods=["POST"])
|
||||||
@admin_level_required(6)
|
@admin_level_required(6)
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def disablesignups(v):
|
def disablesignups(v):
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
{% endfilter %}
|
{% endfilter %}
|
||||||
|
|
||||||
{#<div class="custom-control custom-switch">
|
{#<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>
|
<label class="custom-control-label" for="disablesignups">Disable signups</label>
|
||||||
</div>#}
|
</div>#}
|
||||||
|
|
||||||
|
|
|
@ -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>
|
<a class="nav-link" href="/random/" data-toggle="tooltip" data-placement="bottom" title="Random post"><i class="fas fa-random"></i></a>
|
||||||
</li>
|
</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">
|
<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>
|
<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>
|
</li>
|
||||||
|
|
Loading…
Reference in New Issue