Require non-empty circle name when creating a new circle

This commit is contained in:
Jonas Schäfer
2021-01-23 18:48:34 +01:00
parent d34a7d1413
commit 62226c26ac
2 changed files with 2 additions and 1 deletions

View File

@@ -272,6 +272,7 @@ async def edit_invite(id_: str) -> typing.Union[str, quart.Response]:
class CirclePost(flask_wtf.FlaskForm): # type:ignore
name = wtforms.StringField(
_l("Name"),
validators=[wtforms.validators.InputRequired()],
)
action_create = wtforms.SubmitField(

View File

@@ -41,7 +41,7 @@
{{- create_form.csrf_token -}}
<h2 class="form-title">{% trans %}Create circle{% endtrans %}</h2>
<div class="f-ebox">
{{- create_form.name.label -}}
{{- create_form.name.label(class="required") -}}
{{- create_form.name -}}
</div>
<div class="f-bbox">