Fix wtforms validatoion of package name

This commit is contained in:
rubenwardy
2020-01-24 18:03:40 +00:00
parent ddf5c7f665
commit 53a63367dc
3 changed files with 3 additions and 2 deletions

View File

@@ -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>

View File

@@ -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") }}