aboutsummaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-01-24 18:03:40 +0000
committerrubenwardy <rw@rubenwardy.com>2020-01-24 18:03:40 +0000
commit53a63367dc7defc34616fc784cd19086d60ad54f (patch)
tree4726fe4258809a4d001438dc32c11d2de4809b8b /app/templates
parentddf5c7f665f592f7233afb6e9ee8a1ef9db7aea1 (diff)
downloadcheatdb-53a63367dc7defc34616fc784cd19086d60ad54f.tar.xz
Fix wtforms validatoion of package name
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/macros/topics.html1
-rw-r--r--app/templates/packages/create_edit.html2
2 files changed, 2 insertions, 1 deletions
diff --git a/app/templates/macros/topics.html b/app/templates/macros/topics.html
index 987f810..c4fe32d 100644
--- a/app/templates/macros/topics.html
+++ b/app/templates/macros/topics.html
@@ -54,6 +54,7 @@
<li{% if topic.wip %} class="wiptopic"{% endif %}>
<a href="https://forum.minetest.net/viewtopic.php?t={{ topic.topic_id}}">{{ topic.title }}</a>
{% if topic.wip %}[WIP]{% endif %}
+ {% if topic.discarded %}[Old]{% endif %}
{% if topic.name %}[{{ topic.name }}]{% endif %}
{% if show_author %}
by <a href="{{ url_for('users.profile', username=topic.author.username) }}">{{ topic.author.display_name }}</a>
diff --git a/app/templates/packages/create_edit.html b/app/templates/packages/create_edit.html
index f356fb6..a293938 100644
--- a/app/templates/packages/create_edit.html
+++ b/app/templates/packages/create_edit.html
@@ -50,7 +50,7 @@
{% if package and package.approved and not package.checkPerm(current_user, "CHANGE_NAME") %}
{{ render_field(form.name, class_="pkg_meta col-sm-3", readonly=True) }}
{% else %}
- {{ render_field(form.name, class_="pkg_meta col-sm-3") }}
+ {{ render_field(form.name, class_="pkg_meta col-sm-3", pattern="[a-z0-9_]+", title=_("Lower case letters (a-z), digits (0-9), and underscores (_) only")) }}
{% endif %}
</div>
{{ render_field(form.short_desc, class_="pkg_meta") }}