- Remove welcome message from tenant make customisation
- Add possibility to add allowed_languages to tenant make
This commit is contained in:
@@ -196,6 +196,14 @@ class TenantMakeForm(DynamicFormBase):
|
||||
active = BooleanField('Active', validators=[Optional()], default=True)
|
||||
website = StringField('Website', validators=[DataRequired(), Length(max=255)])
|
||||
logo_url = StringField('Logo URL', validators=[Optional(), Length(max=255)])
|
||||
allowed_languages = SelectMultipleField('Allowed Languages', choices=[], validators=[Optional()])
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(TenantMakeForm, self).__init__(*args, **kwargs)
|
||||
# Initialiseer de taalopties met taalcodes en vlaggen
|
||||
lang_details = current_app.config['SUPPORTED_LANGUAGE_DETAILS']
|
||||
self.allowed_languages.choices = [(details['iso 639-1'], f"{details['flag']} {details['iso 639-1']}")
|
||||
for name, details in lang_details.items()]
|
||||
|
||||
class EditTenantMakeForm(DynamicFormBase):
|
||||
id = IntegerField('ID', widget=HiddenInput())
|
||||
@@ -204,6 +212,14 @@ class EditTenantMakeForm(DynamicFormBase):
|
||||
active = BooleanField('Active', validators=[Optional()], default=True)
|
||||
website = StringField('Website', validators=[DataRequired(), Length(max=255)])
|
||||
logo_url = StringField('Logo URL', validators=[Optional(), Length(max=255)])
|
||||
allowed_languages = SelectMultipleField('Allowed Languages', choices=[], validators=[Optional()])
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(EditTenantMakeForm, self).__init__(*args, **kwargs)
|
||||
# Initialiseer de taalopties met taalcodes en vlaggen
|
||||
lang_details = current_app.config['SUPPORTED_LANGUAGE_DETAILS']
|
||||
self.allowed_languages.choices = [(details['iso 639-1'], f"{details['flag']} {details['iso 639-1']}")
|
||||
for name, details in lang_details.items()]
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user