This commit is contained in:
Martijn Voncken 2008-02-12 19:56:11 +00:00
parent dfaf263d66
commit 75663de03c
2 changed files with 5 additions and 4 deletions

View File

@ -91,6 +91,7 @@ class config_page:
@deco.deluge_page @deco.deluge_page
def POST(self,name): def POST(self,name):
form_class = self.get_form_class(name)
form_data = web.Storage(utils.get_newforms_data(form_class)) form_data = web.Storage(utils.get_newforms_data(form_class))
form = form_class(form_data) form = form_class(form_data)
if form.is_valid(): if form.is_valid():

View File

@ -62,9 +62,10 @@ class AddForm(forms.Form):
widget=forms.TextInput(attrs={'size':60})) widget=forms.TextInput(attrs={'size':60}))
torrent = forms.CharField(label=_("Upload torrent"), required=False, torrent = forms.CharField(label=_("Upload torrent"), required=False,
widget=forms.FileInput(attrs={'size':60})) widget=forms.FileInput(attrs={'size':60}))
hash = forms.CharField(label=_("Hash"), required=False,
widget=forms.TextInput(attrs={'size':60})) #hash = forms.CharField(label=_("Hash"), required=False,
ret = forms.CheckBox(_('Add more')) # widget=forms.TextInput(attrs={'size':60}))
#ret = forms.CheckBox(_('Add more'))
class torrent_add: class torrent_add:
@ -93,7 +94,6 @@ class torrent_add:
if not options_form.is_valid(): if not options_form.is_valid():
print self.add_page(error = _("Error in torrent options.")) print self.add_page(error = _("Error in torrent options."))
return return
options = options_form.clean_data options = options_form.clean_data