backups: Add optional field - Name

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Perform validation for name field]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Joseph Nuthalapati authored and Sunil Mohan Adapa committed 2020-05-18 21:38:58 -07:00
1 parent 10924a1dca
commit f13ad07ecb
2 files changed
+6 -1

No files matched your search

+4
View File
@@ -48,6 +48,10 @@ def _get_repository_choices():
class CreateArchiveForm(forms.Form):
repository = forms.ChoiceField()
name = forms.RegexField(
label=_('Name'),
help_text=_('(Optional) Set a name for this backup archive'),
regex=r'^[^{}/]*$', required=False, strip=True)
selected_apps = forms.MultipleChoiceField(
label=_('Included apps'), help_text=_('Apps to include in the backup'),
widget=forms.CheckboxSelectMultiple)