mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-03 00:31:25 -08:00
fix configured email not showing, add longer site description field, provide more context to options
This commit is contained in:
parent
708edd51b6
commit
c45ed6a435
2 changed files with 7 additions and 3 deletions
|
@ -10,14 +10,15 @@ from app.models import Community, User
|
|||
|
||||
|
||||
class SiteProfileForm(FlaskForm):
|
||||
name = StringField(_l('Name'))
|
||||
name = StringField(_l('Site Name'))
|
||||
description = StringField(_l('Tagline'))
|
||||
icon = FileField(_('Icon'), validators=[
|
||||
FileAllowed(['jpg', 'jpeg', 'png', 'webp'], 'Images only!')
|
||||
])
|
||||
sidebar = TextAreaField(_l('Sidebar'))
|
||||
about = TextAreaField(_l('About'))
|
||||
legal_information = TextAreaField(_l('Legal information'))
|
||||
contact_email = EmailField(_l('General instance contact email address'), validators=[Email(), DataRequired(), Length(min=5, max=255)])
|
||||
contact_email = EmailField(_l('General instance contact email address'), validators=[DataRequired(), Length(min=5, max=255)])
|
||||
submit = SubmitField(_l('Save'))
|
||||
|
||||
|
||||
|
|
|
@ -44,7 +44,8 @@ def admin_site():
|
|||
site = Site()
|
||||
if form.validate_on_submit():
|
||||
site.name = form.name.data
|
||||
site.description = form.description.data
|
||||
site.description = form.description.data #tagline
|
||||
site.about = form.about.data
|
||||
site.sidebar = form.sidebar.data
|
||||
site.legal_information = form.legal_information.data
|
||||
site.updated = utcnow()
|
||||
|
@ -56,8 +57,10 @@ def admin_site():
|
|||
elif request.method == 'GET':
|
||||
form.name.data = site.name
|
||||
form.description.data = site.description
|
||||
form.about.data = site.about
|
||||
form.sidebar.data = site.sidebar
|
||||
form.legal_information.data = site.legal_information
|
||||
form.contact_email.data = site.contact_email
|
||||
return render_template('admin/site.html', title=_('Site profile'), form=form,
|
||||
moderating_communities=moderating_communities(current_user.get_id()),
|
||||
joined_communities=joined_communities(current_user.get_id()),
|
||||
|
|
Loading…
Add table
Reference in a new issue