Commit 7bb61658cf3505fd1c097a46d123941f57aa0394

Authored by Gustavo Bernardo
1 parent 22c2915e

Included the option to select students in create and update subject. [Issue:#411]

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
courses/forms.py
... ... @@ -20,7 +20,7 @@ class CategoryCourseForm(forms.ModelForm):
20 20 }
21 21  
22 22 class CourseForm(forms.ModelForm):
23   -
  23 +
24 24 class Meta:
25 25 model = Course
26 26 fields = ('name', 'category', 'coordenator','public')
... ... @@ -73,9 +73,9 @@ class SubjectForm(forms.ModelForm):
73 73 return end_date
74 74  
75 75 class Meta:
76   -
  76 +
77 77 model = Subject
78   - fields = ('name', 'description','init_date', 'end_date', 'visible',)
  78 + fields = ('name', 'description','init_date', 'end_date', 'visible','students',)
79 79 localized_fields = ('init_date', 'end_date',)
80 80 labels = {
81 81 'name': _('Name'),
... ... @@ -83,6 +83,7 @@ class SubjectForm(forms.ModelForm):
83 83 'init_date': _('Start date'),
84 84 'end_date': _('End date'),
85 85 'visible': _('Is it visible?'),
  86 + 'students': _('Students')
86 87 }
87 88 help_texts = {
88 89 'name': _("Subjects's name"),
... ... @@ -90,6 +91,7 @@ class SubjectForm(forms.ModelForm):
90 91 'init_date': _('Start date of the subject'),
91 92 'end_date': _('End date of the subject'),
92 93 'visible': _('Is the subject visible?'),
  94 + 'students': _('The students that can participate in this subject. Hold down the "Control", or "Command" on the Mac, to select more than one option.')
93 95 }
94 96 widgets = {
95 97 'description':SummernoteWidget(),
... ... @@ -156,5 +158,3 @@ class LinkMaterialForm(forms.ModelForm):
156 158 class Meta:
157 159 model = LinkMaterial
158 160 fields = ['material', 'name', 'description','url']
159   -
160   -
... ...