summaryrefslogtreecommitdiff
blob: 0a91b3bfde9cba4e7607eb6b076f9d35396c7b1b (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
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)