diff --git a/app/community/forms.py b/app/community/forms.py index 99bb0ffd..480ec26b 100644 --- a/app/community/forms.py +++ b/app/community/forms.py @@ -88,7 +88,7 @@ class BanUserCommunityForm(FlaskForm): class CreateDiscussionForm(FlaskForm): communities = SelectField(_l('Community'), validators=[DataRequired()], coerce=int) discussion_title = StringField(_l('Title'), validators=[DataRequired(), Length(min=3, max=255)]) - discussion_body = TextAreaField(_l('Body'), validators=[Optional(), Length(min=3, max=5000)]) + discussion_body = TextAreaField(_l('Body'), validators=[Optional(), Length(min=3, max=5000)], render_kw={'rows': 5}) sticky = BooleanField(_l('Sticky')) nsfw = BooleanField(_l('NSFW')) nsfl = BooleanField(_l('Gore/gross')) @@ -99,7 +99,7 @@ class CreateDiscussionForm(FlaskForm): class CreateLinkForm(FlaskForm): communities = SelectField(_l('Community'), validators=[DataRequired()], coerce=int) link_title = StringField(_l('Title'), validators=[DataRequired(), Length(min=3, max=255)]) - link_body = TextAreaField(_l('Body'), validators=[Optional(), Length(min=3, max=5000)]) + link_body = TextAreaField(_l('Body'), validators=[Optional(), Length(min=3, max=5000)], render_kw={'rows': 5}) link_url = StringField(_l('URL'), validators=[DataRequired(), Regexp(r'^https?://', message='Submitted links need to start with "http://"" or "https://"')], render_kw={'placeholder': 'https://...'}) sticky = BooleanField(_l('Sticky')) @@ -120,7 +120,7 @@ class CreateImageForm(FlaskForm): communities = SelectField(_l('Community'), validators=[DataRequired()], coerce=int) image_title = StringField(_l('Title'), validators=[DataRequired(), Length(min=3, max=255)]) image_alt_text = StringField(_l('Alt text'), validators=[Optional(), Length(min=3, max=255)]) - image_body = TextAreaField(_l('Body'), validators=[Optional(), Length(min=3, max=5000)]) + image_body = TextAreaField(_l('Body'), validators=[Optional(), Length(min=3, max=5000)], render_kw={'rows': 5}) image_file = FileField(_('Image'), validators=[DataRequired()]) sticky = BooleanField(_l('Sticky')) nsfw = BooleanField(_l('NSFW')) diff --git a/app/post/forms.py b/app/post/forms.py index bf85d6c7..dde138d9 100644 --- a/app/post/forms.py +++ b/app/post/forms.py @@ -7,7 +7,7 @@ from app.utils import MultiCheckboxField class NewReplyForm(FlaskForm): - body = TextAreaField(_l('Body'), render_kw={'placeholder': 'What are your thoughts?', 'rows': 3}, validators={DataRequired(), Length(min=3, max=5000)}) + body = TextAreaField(_l('Body'), render_kw={'placeholder': 'What are your thoughts?', 'rows': 5}, validators={DataRequired(), Length(min=3, max=5000)}) notify_author = BooleanField(_l('Notify about replies')) submit = SubmitField(_l('Comment')) diff --git a/app/user/forms.py b/app/user/forms.py index d80760fb..ee1bb6b4 100644 --- a/app/user/forms.py +++ b/app/user/forms.py @@ -14,7 +14,7 @@ class ProfileForm(FlaskForm): email = EmailField(_l('Email address'), validators=[Email(), DataRequired(), Length(min=5, max=255)]) password_field = PasswordField(_l('Set new password'), validators=[Optional(), Length(min=1, max=50)], render_kw={"autocomplete": 'new-password'}) - about = TextAreaField(_l('Bio'), validators=[Optional(), Length(min=3, max=5000)]) + about = TextAreaField(_l('Bio'), validators=[Optional(), Length(min=3, max=5000)], render_kw={'rows': 5}) matrixuserid = StringField(_l('Matrix User ID'), validators=[Optional(), Length(max=255)], render_kw={'autocomplete': 'off'}) profile_file = FileField(_('Avatar image')) banner_file = FileField(_('Top banner image'))