increase rows of text entry fields

This commit is contained in:
rimu 2024-04-11 12:50:26 +12:00
parent 66628c6033
commit 7b162792ee
3 changed files with 5 additions and 5 deletions

View file

@ -88,7 +88,7 @@ class BanUserCommunityForm(FlaskForm):
class CreateDiscussionForm(FlaskForm): class CreateDiscussionForm(FlaskForm):
communities = SelectField(_l('Community'), validators=[DataRequired()], coerce=int) communities = SelectField(_l('Community'), validators=[DataRequired()], coerce=int)
discussion_title = StringField(_l('Title'), validators=[DataRequired(), Length(min=3, max=255)]) 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')) sticky = BooleanField(_l('Sticky'))
nsfw = BooleanField(_l('NSFW')) nsfw = BooleanField(_l('NSFW'))
nsfl = BooleanField(_l('Gore/gross')) nsfl = BooleanField(_l('Gore/gross'))
@ -99,7 +99,7 @@ class CreateDiscussionForm(FlaskForm):
class CreateLinkForm(FlaskForm): class CreateLinkForm(FlaskForm):
communities = SelectField(_l('Community'), validators=[DataRequired()], coerce=int) communities = SelectField(_l('Community'), validators=[DataRequired()], coerce=int)
link_title = StringField(_l('Title'), validators=[DataRequired(), Length(min=3, max=255)]) 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://"')], link_url = StringField(_l('URL'), validators=[DataRequired(), Regexp(r'^https?://', message='Submitted links need to start with "http://"" or "https://"')],
render_kw={'placeholder': 'https://...'}) render_kw={'placeholder': 'https://...'})
sticky = BooleanField(_l('Sticky')) sticky = BooleanField(_l('Sticky'))
@ -120,7 +120,7 @@ class CreateImageForm(FlaskForm):
communities = SelectField(_l('Community'), validators=[DataRequired()], coerce=int) communities = SelectField(_l('Community'), validators=[DataRequired()], coerce=int)
image_title = StringField(_l('Title'), validators=[DataRequired(), Length(min=3, max=255)]) 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_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()]) image_file = FileField(_('Image'), validators=[DataRequired()])
sticky = BooleanField(_l('Sticky')) sticky = BooleanField(_l('Sticky'))
nsfw = BooleanField(_l('NSFW')) nsfw = BooleanField(_l('NSFW'))

View file

@ -7,7 +7,7 @@ from app.utils import MultiCheckboxField
class NewReplyForm(FlaskForm): 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')) notify_author = BooleanField(_l('Notify about replies'))
submit = SubmitField(_l('Comment')) submit = SubmitField(_l('Comment'))

View file

@ -14,7 +14,7 @@ class ProfileForm(FlaskForm):
email = EmailField(_l('Email address'), validators=[Email(), DataRequired(), Length(min=5, max=255)]) 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)], password_field = PasswordField(_l('Set new password'), validators=[Optional(), Length(min=1, max=50)],
render_kw={"autocomplete": 'new-password'}) 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'}) matrixuserid = StringField(_l('Matrix User ID'), validators=[Optional(), Length(max=255)], render_kw={'autocomplete': 'off'})
profile_file = FileField(_('Avatar image')) profile_file = FileField(_('Avatar image'))
banner_file = FileField(_('Top banner image')) banner_file = FileField(_('Top banner image'))