summaryrefslogtreecommitdiff
blob: 40d16699d5005395cea8135e9039c670bbdc5cfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from django import forms

class NameForm(forms.Form):
    packages_search = forms.CharField(label='Find Packages', max_length=100)

class BugForm(forms.Form):
	ChoicesComponent = (('Application', 'Application'),
		     	('baselayout', 'baselayout'),
		     	('Core system', 'Core system'),
		     	('Eclasses and Profiles', 'Eclasses and Profiles'),
		     	('Games', 'Games'),
		     	('GCC Porting', 'GCC Porting'),
		     	('GNOME', 'GNOME'),
		     	('Hardened', 'Hardened'),
		     	('Java', 'Java'),
		     	('KDE', 'KDE'),
		     	('SELinux', 'SELinux'),
		     	('Server', 'Server'),
		     	('Unspecified', 'Unspecified'))

	Product = forms.CharField(max_length=100, label='Product')
	Component = forms.ChoiceField(widget=forms.Select, choices=ChoicesComponent, label='Component')
	Version = forms.CharField(label='Version')
	Summary = forms.CharField(label='Summary')
	Description = forms.CharField(widget=forms.Textarea, label='Description')
	EmergeInfo = forms.CharField(widget=forms.Textarea, label='emerge --info')
	AssigendTo = forms.EmailField(label='Assigned To')
	def __unicode__(self):
		return u'Product : %s, Component : %s, Version : %s, Summary : %s, Description : %s, EmergeInfo : %s, AssigendTo : %s' % (self.Product, self.Component, self.Version, self.Summary, self.Description, self.EmergeInfo, self.AssigendTo)

class BugzillaUser(forms.Form):
    BugzillaName = forms.CharField(label='Bugzilla Name', max_length=100)
    BugzillaPassword = forms.CharField(label='Bugzilla Password', max_length=100, widget=forms.PasswordInput)

class LogsViews(forms.Form):
	ChoicesComponent = (
		('All', 'All'),
		('Fail', 'Fail'),
		('Repoman', 'Repoman'),
		('Qa', 'Qa'),
		('Others', 'Others'),
		('Test', 'Test'),
		('Build', 'Build'),
		)
	LogView = forms.ChoiceField(widget=forms.Select, choices=ChoicesComponent, label='View')
	def __str__(self):
		return '%s' % (self.LogView)