summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-28 15:29:38 -0500
committerDan McGee <dan@archlinux.org>2011-04-28 17:53:22 -0500
commit684fb5353d0e61075c7a24f703b680d58e8dcf00 (patch)
tree129ba167ab83aa1e9f1e506bc1ae7b5358ba145a
parent4fd34a78791ebb5645b4ba02bf520e5c9e5a0504 (diff)
downloadarchweb-684fb5353d0e61075c7a24f703b680d58e8dcf00.tar.gz
archweb-684fb5353d0e61075c7a24f703b680d58e8dcf00.zip
isotests: clean up submissin form
Don't show stupid '-----' entries with radio buttons, remove the list item style since we have radio buttons or checkboxes everywhere anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--isotests/views.py25
-rw-r--r--media/archweb.css2
2 files changed, 16 insertions, 11 deletions
diff --git a/isotests/views.py b/isotests/views.py
index e373d066..50703bd6 100644
--- a/isotests/views.py
+++ b/isotests/views.py
@@ -7,11 +7,22 @@ from .models import (Architecture, BootType, Bootloader, ClockChoice,
Filesystem, HardwareType, InstallType, Iso, IsoType, Module, Source,
Test)
+def standard_field(model, help_text=None):
+ return forms.ModelChoiceField(queryset=model.objects.all(),
+ widget=forms.RadioSelect(), empty_label=None, help_text=help_text)
+
class TestForm(forms.ModelForm):
iso = forms.ModelChoiceField(queryset=Iso.objects.filter(active=True))
- filesystem = forms.ModelChoiceField(queryset=Filesystem.objects.all(),
- help_text="Check the installed system, including fstab.",
- widget=forms.RadioSelect())
+ architecture = standard_field(Architecture)
+ iso_type = standard_field(IsoType)
+ boot_type = standard_field(BootType)
+ hardware_type = standard_field(HardwareType)
+ install_type = standard_field(InstallType)
+ source = standard_field(Source)
+ clock_choice = standard_field(ClockChoice)
+ bootloader = standard_field(Bootloader)
+ filesystem = standard_field(Filesystem,
+ help_text="Check the installed system, including fstab.")
modules = forms.ModelMultipleChoiceField(queryset=Module.objects.all(),
help_text="", widget=forms.CheckboxSelectMultiple(), required=False)
rollback_filesystem = forms.ModelChoiceField(queryset=Filesystem.objects.all(),
@@ -36,14 +47,6 @@ class TestForm(forms.ModelForm):
"modules", "rollback_filesystem", "rollback_modules",
"bootloader", "success", "comments")
widgets = {
- "architecture": forms.RadioSelect(),
- "iso_type": forms.RadioSelect(),
- "boot_type": forms.RadioSelect(),
- "hardware_type": forms.RadioSelect(),
- "install_type": forms.RadioSelect(),
- "source": forms.RadioSelect(),
- "clock_choice": forms.RadioSelect(),
- "bootloader": forms.RadioSelect(),
"modules": forms.CheckboxSelectMultiple(),
}
diff --git a/media/archweb.css b/media/archweb.css
index 936edc79..504c8270 100644
--- a/media/archweb.css
+++ b/media/archweb.css
@@ -262,6 +262,8 @@ ul.admin-actions li { display: inline; padding-left: 1.5em; }
/* iso testing feedback form */
#releng-feedback label { width: auto; display: inline; font-weight: normal; }
+#releng-feedback ul { padding-left: 1em; }
+#releng-feedback li { list-style: none; }
/* highlight current website in the navbar */
#archnavbar.anb-home ul li#anb-home a { color: white !important; }