Add domain field to onion edit form
This commit is contained in:
parent
bbcc451f65
commit
dd51ee379e
1 changed files with 2 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue