Add helpful text to field labels

This commit is contained in:
rubenwardy 2018-05-27 22:55:06 +01:00
parent 2d6b55e67b
commit 05e536b121
No known key found for this signature in database
GPG Key ID: A1E29D52FF81513C
1 changed files with 3 additions and 3 deletions

View File

@ -102,11 +102,11 @@ def package_download_page(package):
class PackageForm(FlaskForm):
name = StringField("Name", [InputRequired(), Length(1, 20), Regexp("^[a-z0-9_]", 0, "Lower case letters (a-z), digits (0-9), and underscores (_) only")])
title = StringField("Title", [InputRequired(), Length(3, 50)])
shortDesc = StringField("Short Description", [InputRequired(), Length(1,200)])
desc = TextAreaField("Long Description", [Optional(), Length(0,10000)])
shortDesc = StringField("Short Description (Plaintext)", [InputRequired(), Length(1,200)])
desc = TextAreaField("Long Description (Markdown)", [Optional(), Length(0,10000)])
type = SelectField("Type", [InputRequired()], choices=PackageType.choices(), coerce=PackageType.coerce, default=PackageType.MOD)
license = QuerySelectField("License", [InputRequired()], query_factory=lambda: License.query, get_pk=lambda a: a.id, get_label=lambda a: a.name)
provides_str = StringField("Provides", [Optional(), Length(0,1000)])
provides_str = StringField("Provides (mods included in package)", [Optional(), Length(0,1000)])
tags = QuerySelectMultipleField('Tags', query_factory=lambda: Tag.query.order_by(db.asc(Tag.name)), get_pk=lambda a: a.id, get_label=lambda a: a.title)
harddep_str = StringField("Hard Dependencies", [Optional(), Length(0,1000)])
softdep_str = StringField("Soft Dependencies", [Optional(), Length(0,1000)])