summaryrefslogtreecommitdiff
path: root/releng/views.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-29 09:33:30 -0500
committerDan McGee <dan@archlinux.org>2011-04-29 09:33:30 -0500
commitabb3ae1502ea66d93d1d12487b195a6c6b8de35b (patch)
treef7dc5f7ed346586922dc5971d4dd7d088fbb0fce /releng/views.py
parent1ab065a982f489368b88ae67ec2997ed2777519a (diff)
releng: make rollback fs a standard_option
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'releng/views.py')
-rw-r--r--releng/views.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/releng/views.py b/releng/views.py
index 973cf330..f23869f7 100644
--- a/releng/views.py
+++ b/releng/views.py
@@ -8,9 +8,10 @@ from .models import (Architecture, BootType, Bootloader, ClockChoice,
Filesystem, HardwareType, InstallType, Iso, IsoType, Module, Source,
Test)
-def standard_field(model, help_text=None):
+def standard_field(model, help_text=None, required=True):
return forms.ModelChoiceField(queryset=model.objects.all(),
- widget=forms.RadioSelect(), empty_label=None, help_text=help_text)
+ widget=forms.RadioSelect(), empty_label=None, help_text=help_text,
+ required=required)
class TestForm(forms.ModelForm):
iso = forms.ModelChoiceField(queryset=Iso.objects.filter(active=True))
@@ -26,10 +27,10 @@ class TestForm(forms.ModelForm):
modules = forms.ModelMultipleChoiceField(queryset=Module.objects.all(),
help_text="", widget=forms.CheckboxSelectMultiple(), required=False)
bootloader = standard_field(Bootloader)
- rollback_filesystem = forms.ModelChoiceField(queryset=Filesystem.objects.all(),
+ rollback_filesystem = standard_field(Filesystem,
help_text="If you did a rollback followed by a new attempt to setup " \
"your lockdevices/filesystems, select which option you took here.",
- widget=forms.RadioSelect(), required=False)
+ required=False)
rollback_modules = forms.ModelMultipleChoiceField(queryset=Module.objects.all(),
help_text="If you did a rollback followed b a new attempt to setup " \
"your lockdevices/filesystems, select which option you took here.",