Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# -*- coding: utf-8 -*- 

2 

3""" 

4 (c) 2019 - Copyright Red Hat Inc 

5 

6 Authors: 

7 Pierre-Yves Chibon <pingou@pingoured.fr> 

8 Karsten Hopp <karsten@redhat.com> 

9 

10""" 

11 

12from __future__ import print_function, unicode_literals 

13 

14import pagure.forms 

15 

16import wtforms 

17 

18 

19class AnityaForm(pagure.forms.PagureForm): 

20 """ Form to configure taiga for a project. """ 

21 

22 anitya_status = wtforms.SelectField( 

23 "Monitoring status of the package in anitya", 

24 [wtforms.validators.DataRequired()], 

25 choices=[ 

26 ("monitoring", "monitoring"), 

27 ("no-monitoring", "no-monitoring"), 

28 ("monitoring-with-scratch", "monitoring-with-scratch"), 

29 ], 

30 ) 

31 

32 

33class OrphanReasonForm(pagure.forms.PagureForm): 

34 """ Form for orphaning reason. """ 

35 

36 orphan_reason = wtforms.SelectField( 

37 "Reason for orphaning package", 

38 [wtforms.validators.optional(strip_whitespace=True)], 

39 choices=[ 

40 ("Lack of time", "Lack of time"), 

41 ("Do not use it anymore", "Do not use it anymore"), 

42 ("Unmaintained upstream", "Unmaintained upstream"), 

43 ("Fails to build from source", "Fails to build from source"), 

44 ("Important bug not fixed", "Important bug not fixed"), 

45 ("Orphaned by releng", "Orphaned by releng"), 

46 ("Other", "Other"), 

47 ], 

48 ) 

49 

50 orphan_reason_info = wtforms.StringField( 

51 "Additional info", 

52 [wtforms.validators.optional(strip_whitespace=True)], 

53 ) 

54 

55 

56class BZOverrideForm(pagure.forms.PagureForm): 

57 """ Form to configure the Fedora/EPEL maintainer for a project. """ 

58 

59 fedora_assignee = wtforms.StringField( 

60 "Maintainer name", [wtforms.validators.optional(strip_whitespace=True)] 

61 ) 

62 epel_assignee = wtforms.StringField( 

63 "EPEL Maintainer name", 

64 [wtforms.validators.optional(strip_whitespace=True)], 

65 )