Add domain field to onion edit form

This commit is contained in:
Ana Custura 2022-12-06 19:41:11 +00:00 committed by irl
parent bbcc451f65
commit dd51ee379e

View file

@ -36,6 +36,7 @@ class NewOnionForm(FlaskForm): # type: ignore
class EditOnionForm(FlaskForm): # type: ignore
description = StringField('Description', validators=[DataRequired()])
group = SelectField('Group', validators=[DataRequired()])
domain_name = StringField('Domain Name', validators=[DataRequired()])
tls_private_key = FileField('TLS Private Key (PEM format)',
description="If no file is submitted, the TLS key will remain unchanged.")
tls_public_key = FileField('TLS Certificate (PEM format)',
@ -93,6 +94,7 @@ def onion_edit(onion_id: int) -> ResponseReturnValue:
if form.validate_on_submit():
onion.group_id = form.group.data
onion.description = form.description.data
onion.domain_name = form.domain_name.data
for at in [
"tls_private_key",
"tls_public_key"