From c2014ca3bfa494fb3d6e4836065b8b463b6a16de Mon Sep 17 00:00:00 2001 From: Sean Kelly Date: Wed, 12 Apr 2023 15:14:12 -0500 Subject: [PATCH] Resolve #253 --- .../src/edrnsite/content/_metadata_collection_form.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/edrnsite.content/src/edrnsite/content/_metadata_collection_form.py b/src/edrnsite.content/src/edrnsite/content/_metadata_collection_form.py index 102e21c4..976f62fc 100644 --- a/src/edrnsite.content/src/edrnsite/content/_metadata_collection_form.py +++ b/src/edrnsite.content/src/edrnsite/content/_metadata_collection_form.py @@ -133,6 +133,10 @@ class MetadataCollectionForm(AbstractEDRNForm): ('other', 'Other'), ) ) + reference_url_other = forms.CharField( + required=False, label='Other', max_length=280, + help_text='If you selected "Other" above, enter the description of the reference URL.' + ) pub_med_id = forms.CharField(required=False, label='PubMed ID', max_length=20) doi = forms.CharField(required=False, label='DOI', max_length=150, help_text='Digital Object Identifier') doi_url = forms.URLField(required=False, label='DOI URL', help_text='URL form of the DOI') @@ -216,6 +220,9 @@ def render_email(self, form): if data['results']: cp.set('Collection', 'ResultsAndConclusionSummary', data['results']) if data['pub_med_id']: cp.set('Collection', 'PubMedID', data['pub_med_id']) if data['reference_url']: cp.set('Collection', 'ReferenceURL', data['reference_url']) + if data['reference_url_description']: + cp.set('Collection', 'ReferenceURLDescription', data['reference_url_description']) + if data['reference_url_other']: cp.set('Collection', 'ReferenceURLOther', data['reference_url_other']) cp.set('Collection', 'Consortium', 'EDRN') cp.set('Collection', 'Species', data['species'])