creating archive through gridftp
[qcg-portal.git] / filex / forms.py
index a934aaf..1c9ffe9 100644 (file)
@@ -13,3 +13,17 @@ class RenameForm(forms.Form):
     path = forms.CharField(label=u'Ścieżka', max_length=1024, widget=forms.HiddenInput())
     src = forms.CharField(label=u'Stara nazwa', max_length=256, widget=forms.HiddenInput())
     dst = forms.CharField(label=u'Nowa nazwa', max_length=256)
+
+
+class ArchiveForm(NewDirForm):
+    ZIP = '.zip'
+    GZIP = '.tar.gz'
+    BZIP = '.tar.bz2'
+
+    TYPE_CHOICES = (
+        (ZIP, 'Archiwum zip'),
+        (GZIP, 'Archiwum tar.gz'),
+        (BZIP, 'Archiwum tar.bz2'),
+    )
+
+    type = forms.ChoiceField(label=u'Typ', choices=TYPE_CHOICES, initial=ZIP)