forked from rDrama/rDrama
sfd
parent
35cb378758
commit
bcd58d1a7b
|
@ -93,8 +93,7 @@ def publish(pid, v):
|
|||
def submit_get(v, sub=None):
|
||||
if sub: sub = g.db.query(Sub.name).filter_by(name=sub).one_or_none()
|
||||
|
||||
if sub: sub = sub[0]
|
||||
elif request.path.startswith('/s/'): abort(404)
|
||||
if request.path.startswith('/s/') and not sub: abort(404)
|
||||
|
||||
return render_template("submit.html", v=v, sub=sub)
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
|
||||
<div class="submit-grid-view">
|
||||
<form id="submitform" action="{% if sub %}/s/{{sub}}{% endif %}/submit" method="post" enctype="multipart/form-data" style="grid-column: 2">
|
||||
<form id="submitform" action="{% if sub %}/s/{{sub.name}}{% endif %}/submit" method="post" enctype="multipart/form-data" style="grid-column: 2">
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
|||
general
|
||||
</option>
|
||||
{% for s in SUBS %}
|
||||
<option value="{{s}}" {% if sub == s %}selected{% endif %}>
|
||||
<option value="{{s}}" {% if sub.name == s %}selected{% endif %}>
|
||||
/s/{{s}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue