X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;ds=sidebyside;f=filex%2Fforms.py;h=1c9ffe9e9b4ea4b9c08eb59abc945d2a7b52c3d7;hb=2e226ed0e2a8bbf0cedbcaf5fff9e2906e858588;hp=a934aaf6ad04be317d5f49f3dd37d86f20c9f2c2;hpb=6b3c7d687f8f1002574d3ccf135c7443e61d488b;p=qcg-portal.git diff --git a/filex/forms.py b/filex/forms.py index a934aaf..1c9ffe9 100644 --- a/filex/forms.py +++ b/filex/forms.py @@ -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)