fds
This commit is contained in:
parent
0207d82f79
commit
417ed04459
2 changed files with 3 additions and 3 deletions
|
@ -862,7 +862,7 @@ def submit_post(v, sub=None):
|
||||||
return render_template("submit.html", SUBS=SUBS, v=v, error=error, title=title, url=url, body=body, ghost=submit_ghost(v,g.db)), 400
|
return render_template("submit.html", SUBS=SUBS, v=v, error=error, title=title, url=url, body=body, ghost=submit_ghost(v,g.db)), 400
|
||||||
|
|
||||||
|
|
||||||
sub = request.values.get("sub").replace('/s/','')
|
sub = request.values.get("sub").replace('/s/','').replace('s/','')
|
||||||
|
|
||||||
if sub and sub != 'none':
|
if sub and sub != 'none':
|
||||||
sub = g.db.query(Sub.name).filter_by(name=sub.strip().lower()).one_or_none()
|
sub = g.db.query(Sub.name).filter_by(name=sub.strip().lower()).one_or_none()
|
||||||
|
|
|
@ -87,11 +87,11 @@
|
||||||
<input list="subs" autocomplete="off" id='sub' class="form-control" form="submitform" name="sub" oninput="savetext()">
|
<input list="subs" autocomplete="off" id='sub' class="form-control" form="submitform" name="sub" oninput="savetext()">
|
||||||
<datalist id="subs">
|
<datalist id="subs">
|
||||||
{% if SITE_NAME != 'Ruqqus' %}
|
{% if SITE_NAME != 'Ruqqus' %}
|
||||||
<option value="/s/none" selected></option>
|
<option value="none" selected></option>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for s in SUBS %}
|
{% for s in SUBS %}
|
||||||
<option value="/s/{{s}}" {% if sub and sub.name == s %}selected{% endif %}></option>
|
<option value="{{s}}" {% if sub and sub.name == s %}selected{% endif %}></option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</datalist>
|
</datalist>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue