for consistency's sake, don't use {sub.name} inside strings anymore

remotes/1693045480750635534/spooky-22
Aevann1 2022-09-12 07:25:04 +02:00
parent eb69b039a0
commit 2e31b52366
13 changed files with 60 additions and 60 deletions

View File

@ -30,7 +30,7 @@ def exile_post(v, pid):
send_notification(u.id, f"@{v.username} has exiled you from /h/{sub} for [{p.title}]({p.shortlink})")
return {"message": f"@{u.username} has been exiled from /h/{sub.name} successfully!"}
return {"message": f"@{u.username} has been exiled from /h/{sub} successfully!"}
@ -57,7 +57,7 @@ def exile_comment(v, cid):
send_notification(u.id, f"@{v.username} has exiled you from /h/{sub} for [{c.permalink}]({c.shortlink})")
return {"message": f"@{u.username} has been exiled from /h/{sub.name} successfully!"}
return {"message": f"@{u.username} has been exiled from /h/{sub} successfully!"}
@app.post("/h/<sub>/unexile/<uid>")
@ -76,7 +76,7 @@ def unexile(v, sub, uid):
if request.headers.get("Authorization") or request.headers.get("xhr"):
return {"message": f"@{u.username} has been unexiled from /h/{sub.name} successfully!"}
return {"message": f"@{u.username} has been unexiled from /h/{sub} successfully!"}
return redirect(f'/h/{sub}/exilees')
@ -101,7 +101,7 @@ def block_sub(v, sub):
g.db.add(block)
cache.delete_memoized(frontlist)
return {"message": f"/h/{sub.name} blocked successfully!"}
return {"message": f"/h/{sub} blocked successfully!"}
@app.post("/h/<sub>/unblock")
@ -117,7 +117,7 @@ def unblock_sub(v, sub):
g.db.delete(block)
cache.delete_memoized(frontlist)
return {"message": f"/h/{sub.name} unblocked successfully!"}
return {"message": f"/h/{sub} unblocked successfully!"}
@app.post("/h/<sub>/subscribe")
@ -134,7 +134,7 @@ def subscribe_sub(v, sub):
g.db.add(subscribe)
cache.delete_memoized(frontlist)
return {"message": f"/h/{sub.name} unblocked successfully!"}
return {"message": f"/h/{sub} unblocked successfully!"}
@app.post("/h/<sub>/unsubscribe")
@auth_required
@ -149,7 +149,7 @@ def unsubscribe_sub(v, sub):
g.db.delete(subscribe)
cache.delete_memoized(frontlist)
return {"message": f"/h/{sub.name} blocked successfully!"}
return {"message": f"/h/{sub} blocked successfully!"}
@app.post("/h/<sub>/follow")
@auth_required
@ -164,7 +164,7 @@ def follow_sub(v, sub):
g.db.add(subscription)
cache.delete_memoized(frontlist)
return {"message": f"/h/{sub.name} followed successfully!"}
return {"message": f"/h/{sub} followed successfully!"}
@app.post("/h/<sub>/unfollow")
@auth_required
@ -178,7 +178,7 @@ def unfollow_sub(v, sub):
g.db.delete(subscription)
cache.delete_memoized(frontlist)
return {"message": f"/h/{sub.name} unfollowed successfully!"}
return {"message": f"/h/{sub} unfollowed successfully!"}
@app.get("/h/<sub>/mods")
@auth_required
@ -333,9 +333,9 @@ def create_sub2(v):
admins = [x[0] for x in g.db.query(User.id).filter(User.admin_level > 1, User.id != v.id).all()]
for admin in admins:
send_repeatable_notification(admin, f":!marseyparty: /h/{sub.name} has been created by @{v.username} :marseyparty:")
send_repeatable_notification(admin, f":!marseyparty: /h/{sub} has been created by @{v.username} :marseyparty:")
return redirect(f'/h/{sub.name}')
return redirect(f'/h/{sub}')
@app.post("/kick/<pid>")
@is_not_permabanned
@ -384,7 +384,7 @@ def post_sub_sidebar(v, sub):
g.db.add(sub)
return redirect(f'/h/{sub.name}/settings')
return redirect(f'/h/{sub}/settings')
@app.post('/h/<sub>/css')
@ -409,7 +409,7 @@ def post_sub_css(v, sub):
sub.css = css
g.db.add(sub)
return redirect(f'/h/{sub.name}/settings')
return redirect(f'/h/{sub}/settings')
@app.get("/h/<sub>/css")
@ -446,7 +446,7 @@ def sub_banner(v, sub):
sub.bannerurl = bannerurl
g.db.add(sub)
return redirect(f'/h/{sub.name}/settings')
return redirect(f'/h/{sub}/settings')
@app.post("/h/<sub>/sidebar_image")
@limiter.limit("1/second;10/day")
@ -472,7 +472,7 @@ def sub_sidebar(v, sub):
sub.sidebarurl = sidebarurl
g.db.add(sub)
return redirect(f'/h/{sub.name}/settings')
return redirect(f'/h/{sub}/settings')
@app.post("/h/<sub>/marsey_image")
@limiter.limit("1/second;10/day")
@ -498,7 +498,7 @@ def sub_marsey(v, sub):
sub.marseyurl = marseyurl
g.db.add(sub)
return redirect(f'/h/{sub.name}/settings')
return redirect(f'/h/{sub}/settings')
@app.get("/holes")
@auth_desired_with_logingate
@ -558,6 +558,6 @@ def sub_stealth(v, sub):
cache.delete_memoized(frontlist)
if sub.stealth:
return {"message": f"Stealth mode has been enabled for /h/{sub.name} successfully!"}
return {"message": f"Stealth mode has been enabled for /h/{sub} successfully!"}
else:
return {"message": f"Stealth mode has been disabled for /h/{sub.name} successfully!"}
return {"message": f"Stealth mode has been disabled for /h/{sub} successfully!"}

View File

@ -52,7 +52,7 @@
{% endif %}
{% if sub and sub.css and not request.path.endswith('settings') and not request.values.get('nocss') %}
<link rel="stylesheet" href="/h/{{sub.name}}/css" type="text/css">
<link rel="stylesheet" href="/h/{{sub}}/css" type="text/css">
{% endif %}
{% if v and v.themecolor == '30409f' %}
@ -268,7 +268,7 @@
{% if '@' not in request.path %}
{% if sub and SITE_NAME != 'WPD' %}
<a href="{{sub.banner_url}}">
<img alt="/h/{{sub.name}} banner" onclick="expandDesktopImage()" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:min(42vh,30vw)!important">
<img alt="/h/{{sub}} banner" onclick="expandDesktopImage()" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:min(42vh,30vw)!important">
</a>
{% elif SITE_NAME == 'rDrama' %}
<a href="https://secure.transequality.org/site/Donation2?df_id=1480">

View File

@ -64,7 +64,7 @@
</a>
{% if sub %}
<a id="sub-name" href="/h/{{sub.name}}" class="font-weight-bold ml-2 flex-grow-1 mt-1" style="font-size:max(14px,1.2vw)">{% if not HOLE_STYLE_FLAIR %}/h/{% endif %}{{sub.name}}</a>
<a id="sub-name" href="/h/{{sub}}" class="font-weight-bold ml-2 flex-grow-1 mt-1" style="font-size:max(14px,1.2vw)">{% if not HOLE_STYLE_FLAIR %}/h/{% endif %}{{sub}}</a>
{% elif has_logo %}
<style>
{% if g.webview %}
@ -116,7 +116,7 @@
{% endif %}
{% if v %}
<a class="mobile-nav-icon d-md-none" href="{% if sub %}/h/{{sub.name}}{% endif %}/submit"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
<a class="mobile-nav-icon d-md-none" href="{% if sub %}/h/{{sub}}{% endif %}/submit"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
{% else %}
<a class="mobile-nav-icon d-md-none" href="/login"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
{% endif %}
@ -157,7 +157,7 @@
{% endif %}
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
<a class="nav-link" href="{% if sub %}/h/{{sub.name}}{% endif %}/submit" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Create Post"><i class="fas fa-feather-alt"></i></a>
<a class="nav-link" href="{% if sub %}/h/{{sub}}{% endif %}/submit" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Create Post"><i class="fas fa-feather-alt"></i></a>
</li>
{% if FEATURES['CHAT'] -%}

View File

@ -11,10 +11,10 @@
{% set preview = sub.banner_url %}
{% endif %}
<title>/h/{{sub.name}}</title>
<title>/h/{{sub}}</title>
<meta property="og:type" content="article">
<meta property="og:title" content="/h/{{sub.name}}">
<meta property="og:title" content="/h/{{sub}}">
<meta property="og:site_name" content="{{SITE}}">
<meta property="og:image" content="{{preview}}">
<meta property="og:url" content="{{request.full_path}}">
@ -22,7 +22,7 @@
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="{{SITE_FULL}}">
<meta name="twitter:title" content="/h/{{sub.name}}">
<meta name="twitter:title" content="/h/{{sub}}">
<meta name="twitter:creator" content="{{SITE_FULL}}">
<meta name="twitter:image" content="{{preview}}">
<meta name="twitter:url" content="{{request.full_path}}">
@ -40,25 +40,25 @@
<div class="row" style="overflow: visible;padding-top:5px;">
<div class="col">
<a class="btn btn-primary btn-block mt-3" href="{% if sub %}/h/{{sub.name}}{% endif %}/submit"><i class="fas fa-feather-alt mr-2"></i>Create Post</a>
<a class="btn btn-primary btn-block mt-3" href="{% if sub %}/h/{{sub}}{% endif %}/submit"><i class="fas fa-feather-alt mr-2"></i>Create Post</a>
{% if sub %}
{% if v %}
{%- set hole_prefix = '/h/' if not HOLE_STYLE_FLAIR else '' -%}
{% if sub.stealth %}
<a id="subscribe-sub" class="btn btn-primary btn-block {% if v.subscribes(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/subscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock {{hole_prefix}}{{sub.name}}</a>
<a id="unsubscribe-sub" class="btn btn-primary btn-block {% if not v.subscribes(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unsubscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub.name}}</a>
<a id="subscribe-sub" class="btn btn-primary btn-block {% if v.subscribes(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/subscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock {{hole_prefix}}{{sub}}</a>
<a id="unsubscribe-sub" class="btn btn-primary btn-block {% if not v.subscribes(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/unsubscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub}}</a>
{% else %}
<a id="block-sub" class="btn btn-primary btn-block mt-3 {% if v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/block','block-sub','unblock-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub.name}}</a>
<a id="unblock-sub" class="btn btn-primary btn-block mt-3 {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unblock','block-sub','unblock-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock {{hole_prefix}}{{sub.name}}</a>
<a id="block-sub" class="btn btn-primary btn-block mt-3 {% if v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/block','block-sub','unblock-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub}}</a>
<a id="unblock-sub" class="btn btn-primary btn-block mt-3 {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/unblock','block-sub','unblock-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock {{hole_prefix}}{{sub}}</a>
{% endif %}
<a id="follow-sub" class="btn btn-primary btn-follow {% if v.follows(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/follow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell mr-2"></i>Follow {{hole_prefix}}{{sub.name}}</a>
<a id="unfollow-sub" class="btn btn-primary btn-follow {% if not v.follows(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/unfollow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell-slash mr-2"></i>Unfollow {{hole_prefix}}{{sub.name}}</a>
<a id="follow-sub" class="btn btn-primary btn-follow {% if v.follows(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/follow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell mr-2"></i>Follow {{hole_prefix}}{{sub}}</a>
<a id="unfollow-sub" class="btn btn-primary btn-follow {% if not v.follows(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub}}/unfollow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell-slash mr-2"></i>Unfollow {{hole_prefix}}{{sub}}</a>
{% else %}
<a class="btn btn-primary btn-block" href="/login"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub.name}}</a>
<a class="btn btn-primary btn-block" href="/login"><i class="fas fa-bell mr-2"></i>Follow {{hole_prefix}}{{sub.name}}</a>
<a class="btn btn-primary btn-block" href="/login"><i class="fas fa-eye-slash mr-2"></i>Block {{hole_prefix}}{{sub}}</a>
<a class="btn btn-primary btn-block" href="/login"><i class="fas fa-bell mr-2"></i>Follow {{hole_prefix}}{{sub}}</a>
{% endif %}
{% endif %}

View File

@ -12,10 +12,10 @@
<div class="mb-4">{{sub.sidebar_html|safe}}</div>
{% endif %}
{% if v and v.mods(sub.name) %}
<a class="btn btn-primary btn-block" href="/h/{{sub.name}}/settings">{{HOLE_NAME|upper}} SETTINGS</a>
<a class="btn btn-primary btn-block" href="/h/{{sub}}/settings">{{HOLE_NAME|upper}} SETTINGS</a>
{% endif %}
<a class="btn btn-primary btn-block" href="/h/{{sub.name}}/mods">{{HOLE_NAME|upper}} MODS</a>
<a class="btn btn-primary btn-block" href="/h/{{sub.name}}/exilees">{{HOLE_NAME|upper}} EXILEES</a>
<a class="btn btn-primary btn-block" href="/h/{{sub}}/mods">{{HOLE_NAME|upper}} MODS</a>
<a class="btn btn-primary btn-block" href="/h/{{sub}}/exilees">{{HOLE_NAME|upper}} EXILEES</a>
{% endif %}
{% if v and v.can_create_hole -%}

View File

@ -38,11 +38,11 @@
<a class="btn btn-primary btn-block mb-3" href="/create_hole">CREATE {{HOLE_NAME|upper}}</a>
{%- endif %}
{% if v.mods(sub.name) %}
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/settings">{{HOLE_NAME|upper}} SETTINGS</a>
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub}}/settings">{{HOLE_NAME|upper}} SETTINGS</a>
{% endif %}
{% endif %}
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/mods">{{HOLE_NAME|upper}} MODS</a>
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/exilees">{{HOLE_NAME|upper}} EXILEES</a>
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub}}/mods">{{HOLE_NAME|upper}} MODS</a>
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub}}/exilees">{{HOLE_NAME|upper}} EXILEES</a>
{% else %}
<a id="sidebar--directory--btn" class="btn btn-primary btn-block mb-3" href="/directory">
<span id="sidebar--directory--head">DIRECTORY</span>

View File

@ -4,7 +4,7 @@
</pre>
<h5>Users {{verb}} /h/{{sub.name}}</h5>
<h5>Users {{verb}} /h/{{sub}}</h5>
<pre></pre>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">

View File

@ -4,7 +4,7 @@
</pre>
<h5>Users exiled from /h/{{sub.name}}</h5>
<h5>Users exiled from /h/{{sub}}</h5>
<pre></pre>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
@ -26,7 +26,7 @@
</td>
<td>
{% if v.mods(sub.name) %}
<form action="/h/{{sub.name}}/unexile/{{user.id}}" method="post">
<form action="/h/{{sub}}/unexile/{{user.id}}" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input class="btn btn-primary" autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Unexile">
</form>

View File

@ -4,7 +4,7 @@
</pre>
<h5>/h/{{sub.name}} Mods</h5>
<h5>/h/{{sub}} Mods</h5>
<pre></pre>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
@ -22,7 +22,7 @@
<td data-time="{{mod.created_utc}}"></td>
<td>
{% if v.id == user.id or v.mod_date(sub.name) and v.mod_date(sub.name) < mod.created_utc %}
<form action="/h/{{sub.name}}/remove_mod" method="post">
<form action="/h/{{sub}}/remove_mod" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input type="hidden" name="uid" value="{{user.id}}">
<input class="btn btn-primary" autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="{% if v.id == user.id %}Resign{% else %}Remove Mod{% endif %}">
@ -35,7 +35,7 @@
</table>
{% if v.mods(sub.name) %}
<form action="/h/{{sub.name}}/add_mod" method="post">
<form action="/h/{{sub}}/add_mod" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input class="form-control" style="display:inline;width:250px" autocomplete="off" type="text" name="user" class="form-control" placeholder="Enter username..">
<input class="btn btn-primary" autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Add Mod">

View File

@ -34,7 +34,7 @@
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="stealth" name="stealth" {% if sub.stealth %}checked{% endif %} onchange="post_toast(this,'/h/{{sub.name}}/stealth');">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="stealth" name="stealth" {% if sub.stealth %}checked{% endif %} onchange="post_toast(this,'/h/{{sub}}/stealth');">
<label class="custom-control-label" for="stealth"></label>
</div>
<span class="text-small text-muted">Make this hole blocked by default (users can visit it to unblock it).</span>
@ -56,7 +56,7 @@
<div class="d-flex">
<div>
<form action="/h/{{sub.name}}/marsey_image" method="post" enctype="multipart/form-data">
<form action="/h/{{sub}}/marsey_image" method="post" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Update<input autocomplete="off" type="file" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} hidden name="marsey" onchange="form.submit()">
@ -91,7 +91,7 @@
<div class="d-flex">
<div>
<form action="/h/{{sub.name}}/sidebar_image" method="post" enctype="multipart/form-data">
<form action="/h/{{sub}}/sidebar_image" method="post" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Update<input autocomplete="off" type="file" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} hidden name="sidebar" onchange="form.submit()">
@ -127,7 +127,7 @@
<div class="d-flex">
<div>
<form action="/h/{{sub.name}}/banner" method="post" enctype="multipart/form-data">
<form action="/h/{{sub}}/banner" method="post" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Update<input autocomplete="off" type="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*" hidden name="banner" onchange="form.submit()">
@ -157,7 +157,7 @@
</div>
<div class="body d-lg-flex">
<div class="w-lg-100">
<form id="sidebar" action="/h/{{sub.name}}/sidebar" method="post">
<form id="sidebar" action="/h/{{sub}}/sidebar" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<textarea autocomplete="off" maxlength="10000" class="form-control rounded" id="bio-text" aria-label="With textarea" placeholder="Enter sidebar here..." rows="10" name="sidebar" form="sidebar">{% if sub.sidebar %}{{sub.sidebar}}{% endif %}</textarea>
@ -180,7 +180,7 @@
</div>
<div class="body d-lg-flex">
<div class="w-lg-100">
<form id="css" action="/h/{{sub.name}}/css" method="post">
<form id="css" action="/h/{{sub}}/css" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<textarea autocomplete="off" maxlength="6000" class="form-control rounded" id="bio-text" aria-label="With textarea" placeholder="Enter css here..." rows="10" name="css" form="css">{% if sub.css %}{{sub.css}}{% endif %}</textarea>

View File

@ -21,10 +21,10 @@
{% for sub, count in subs %}
<tr>
<td>{{loop.index}}</td>
<td><a href="/h/{{sub.name}}">{{sub.name}} {% if sub.name in v.all_blocks %}<span class="text-danger">[blocked, visit it to unblock it]</span>{% endif %}</a></td>
<td><a href="/h/{{sub.name}}" >{{count}}</a></td>
<td><a href="/h/{{sub.name}}/followers">{{sub.follow_num}}</a></td>
<td><a href="/h/{{sub.name}}/blockers">{{sub.block_num}}</a></td>
<td><a href="/h/{{sub}}">{{sub}} {% if sub.name in v.all_blocks %}<span class="text-danger">[blocked, visit it to unblock it]</span>{% endif %}</a></td>
<td><a href="/h/{{sub}}" >{{count}}</a></td>
<td><a href="/h/{{sub}}/followers">{{sub.follow_num}}</a></td>
<td><a href="/h/{{sub}}/blockers">{{sub.block_num}}</a></td>
</tr>
{% endfor %}
</table>

View File

@ -4,7 +4,7 @@
</pre>
<h5>Users subscribed to /h/{{sub.name}}</h5>
<h5>Users subscribed to /h/{{sub}}</h5>
<pre></pre>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">

View File

@ -67,7 +67,7 @@
<div class="submit-grid-view">
<form id="submitform" action="{% if sub %}/h/{{sub.name}}{% endif %}/submit" method="post" enctype="multipart/form-data" style="grid-column: 2">
<form id="submitform" action="{% if sub %}/h/{{sub}}{% endif %}/submit" method="post" enctype="multipart/form-data" style="grid-column: 2">
<div class="container">
@ -85,7 +85,7 @@
<div class="input-group mb2">
{%- set hole_placeholder = 'Required' if HOLE_REQUIRED else 'Optional' -%}
<input list="subs" autocomplete="off" id='sub' class="form-control" form="submitform" name="sub" oninput="savetext()" onchange="updateCategories()" {% if sub %}value="{{sub.name}}"{% endif %} placeholder="{{hole_placeholder}}">
<input list="subs" autocomplete="off" id='sub' class="form-control" form="submitform" name="sub" oninput="savetext()" onchange="updateCategories()" {% if sub %}value="{{sub}}"{% endif %} placeholder="{{hole_placeholder}}">
<datalist id="subs">
{% for s in SUBS %}
<option value="{{s}}"></option>