extracting archive in gridftp
[qcg-portal.git] / filex / forms.py
1 # coding=utf-8
2 from django import forms
3
4
5 class NewDirForm(forms.Form):
6     host = forms.CharField(label=u'Host', max_length=256, widget=forms.HiddenInput())
7     path = forms.CharField(label=u'Ścieżka', max_length=1024, widget=forms.HiddenInput())
8     name = forms.CharField(label=u'Nazwa', max_length=256)
9
10
11 class RenameForm(forms.Form):
12     host = forms.CharField(label=u'Host', max_length=256, widget=forms.HiddenInput())
13     path = forms.CharField(label=u'Ścieżka', max_length=1024, widget=forms.HiddenInput())
14     src = forms.CharField(label=u'Stara nazwa', max_length=256, widget=forms.HiddenInput())
15     dst = forms.CharField(label=u'Nowa nazwa', max_length=256)
16
17
18 class ArchiveForm(NewDirForm):
19     ZIP = '.zip'
20     GZIP = '.tar.gz'
21     BZIP = '.tar.bz2'
22
23     TYPE_CHOICES = (
24         (ZIP, 'Archiwum zip'),
25         (GZIP, 'Archiwum tar.gz'),
26         (BZIP, 'Archiwum tar.bz2'),
27     )
28
29     type = forms.ChoiceField(label=u'Typ', choices=TYPE_CHOICES, initial=ZIP)