mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
backups: Better explanation for the format of upload file
Fixes: #2115. Tests: - Visit the backups upload page. Notice that the new help text is as expected. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
d85105a428
commit
15e9c6cad9
@ -15,6 +15,7 @@ from django.core.validators import (FileExtensionValidator,
|
|||||||
from django.utils.translation import gettext
|
from django.utils.translation import gettext
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
from plinth import cfg
|
||||||
from plinth.modules.storage import get_mounts
|
from plinth.modules.storage import get_mounts
|
||||||
from plinth.utils import format_lazy
|
from plinth.utils import format_lazy
|
||||||
|
|
||||||
@ -138,7 +139,11 @@ class UploadForm(forms.Form):
|
|||||||
label=_('Upload File'), required=True, validators=[
|
label=_('Upload File'), required=True, validators=[
|
||||||
FileExtensionValidator(
|
FileExtensionValidator(
|
||||||
['gz'], _('Backup files have to be in .tar.gz format'))
|
['gz'], _('Backup files have to be in .tar.gz format'))
|
||||||
], help_text=_('Select the backup file you want to upload'))
|
], help_text=format_lazy(
|
||||||
|
_('Select the backup file to upload from the local computer. This '
|
||||||
|
'must be a file previously downloaded from the result of a '
|
||||||
|
'successful backup on a {box_name}. It must have a .tar.gz '
|
||||||
|
'extension.'), box_name=_(cfg.box_name)))
|
||||||
|
|
||||||
|
|
||||||
def repository_validator(path):
|
def repository_validator(path):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user