mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
feat: add question on external organisations
This commit is contained in:
@@ -71,13 +71,14 @@ class DynamicAnswerSetBase(forms.Form):
|
||||
if as_filters and question.filter_text:
|
||||
field_label = question.filter_text
|
||||
|
||||
field = field_class(label=field_label,
|
||||
queryset=question.answers,
|
||||
widget=field_widget,
|
||||
required=(self.field_required
|
||||
and not question.allow_free_text),
|
||||
initial=initial.get(field_name, None),
|
||||
help_text=question.help_text if not as_filters else '')
|
||||
field = field_class(
|
||||
label=field_label,
|
||||
queryset=question.answers,
|
||||
widget=field_widget,
|
||||
required=(self.field_required
|
||||
and not question.allow_free_text),
|
||||
initial=initial.get(field_name, None),
|
||||
help_text=question.help_text if not as_filters else '')
|
||||
self.fields[field_name] = field
|
||||
field_order.append(field_name)
|
||||
|
||||
@@ -164,6 +165,7 @@ class PersonAnswerSetForm(forms.ModelForm, DynamicAnswerSetBase):
|
||||
'organisation_started_date',
|
||||
'project_started_date',
|
||||
'job_title',
|
||||
'external_organisations',
|
||||
'latitude',
|
||||
'longitude',
|
||||
]
|
||||
@@ -178,12 +180,18 @@ class PersonAnswerSetForm(forms.ModelForm, DynamicAnswerSetBase):
|
||||
labels = {
|
||||
'project_started_date':
|
||||
f'Date started on the {settings.PARENT_PROJECT_NAME} project',
|
||||
'external_organisations':
|
||||
(f'Please list the main organisations external to {settings.PARENT_PROJECT_NAME} '
|
||||
'work that you have been working with since 1st January 2019 that are '
|
||||
'involved in food/water security in African dryland regions'),
|
||||
}
|
||||
help_texts = {
|
||||
'organisation_started_date':
|
||||
'If you don\'t know the exact date, an approximate date is okay.',
|
||||
'project_started_date':
|
||||
'If you don\'t know the exact date, an approximate date is okay.',
|
||||
'external_organisations':
|
||||
'Please use commas to separate organisation names.',
|
||||
}
|
||||
|
||||
question_model = models.PersonQuestion
|
||||
|
||||
Reference in New Issue
Block a user