equal
deleted
inserted
replaced
18 class ClaimTaskForm(forms.ModelForm): |
18 class ClaimTaskForm(forms.ModelForm): |
19 class Meta: |
19 class Meta: |
20 model = Claim |
20 model = Claim |
21 fields = ['message'] |
21 fields = ['message'] |
22 |
22 |
23 def ChoiceForm(choices, instance=None): |
23 def ChoiceForm(choices): |
24 """ return a form object with appropriate choices """ |
24 """ return a form object with appropriate choices """ |
25 |
25 |
26 class myform(forms.Form): |
26 class myform(forms.Form): |
27 user = forms.ChoiceField(choices=choices, required=True) |
27 choice = forms.ChoiceField(choices=choices, required=True) |
28 form = myform() |
28 form = myform() |
29 return form |
29 return form |
30 |
30 |
31 def AddTaskForm(task_choices, is_plain=False): |
31 def AddTaskForm(task_choices, is_plain=False): |
32 """ if is_plain is true, it means the task has no subs/deps. |
32 """ if is_plain is true, it means the task has no subs/deps. |