mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
link url needs to be optional #123
This commit is contained in:
parent
bf1393a0f2
commit
12fc9654d3
1 changed files with 8 additions and 8 deletions
|
@ -88,15 +88,15 @@ class BanUserCommunityForm(FlaskForm):
|
|||
class CreatePostForm(FlaskForm):
|
||||
communities = SelectField(_l('Community'), validators=[DataRequired()], coerce=int)
|
||||
post_type = HiddenField() # https://getbootstrap.com/docs/4.6/components/navs/#tabs
|
||||
discussion_title = StringField(_l('Title'), validators={Optional(), Length(min=3, max=255)})
|
||||
discussion_body = TextAreaField(_l('Body'), validators={Optional(), Length(min=3, max=5000)}, render_kw={'placeholder': 'Text (optional)'})
|
||||
link_title = StringField(_l('Title'), validators={Optional(), Length(min=3, max=255)})
|
||||
link_body = TextAreaField(_l('Body'), validators={Optional(), Length(min=3, max=5000)},
|
||||
discussion_title = StringField(_l('Title'), validators=[Optional(), Length(min=3, max=255)])
|
||||
discussion_body = TextAreaField(_l('Body'), validators=[Optional(), Length(min=3, max=5000)], render_kw={'placeholder': 'Text (optional)'})
|
||||
link_title = StringField(_l('Title'), validators=[Optional(), Length(min=3, max=255)])
|
||||
link_body = TextAreaField(_l('Body'), validators=[Optional(), Length(min=3, max=5000)],
|
||||
render_kw={'placeholder': 'Text (optional)'})
|
||||
link_url = StringField(_l('URL'), validators=[Regexp(r'^https?://', message='Submitted links need to start with "http://"" or "https://"')], render_kw={'placeholder': 'https://...'})
|
||||
image_title = StringField(_l('Title'), 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)},
|
||||
link_url = StringField(_l('URL'), validators=[Optional(), Regexp(r'^https?://', message='Submitted links need to start with "http://"" or "https://"')], render_kw={'placeholder': 'https://...'})
|
||||
image_title = StringField(_l('Title'), 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)],
|
||||
render_kw={'placeholder': 'Text (optional)'})
|
||||
image_file = FileField(_('Image'))
|
||||
# flair = SelectField(_l('Flair'), coerce=int)
|
||||
|
|
Loading…
Add table
Reference in a new issue