Skip to content

Commit

Permalink
Comment from HK: add associated publication
Browse files Browse the repository at this point in the history
  • Loading branch information
nutjob4life committed Mar 14, 2024
1 parent 94e4a1d commit 36de7b5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ def get_encoding_type() -> str:
('karyotypic', 'Karyotypic'),
)
)
associated_publication = forms.CharField(
required=False,
max_length=500,
help_text="Enter the associated publication's PubMed ID or its title."
)

if not settings.DEBUG:
captcha = ReCaptchaField()
Expand Down Expand Up @@ -178,6 +183,10 @@ def process_submission(self, form: forms.Form) -> dict:
if subtype:
rendered += f'\nMolecular Subtype: {subtype}'

associated_publication = data.get('associated_publication')
if associated_publication:
rendered += f'\nAssociated Publication: {associated_publication}'

biomarker_file = form.cleaned_data['biomarker_file']
if biomarker_file:
rendered += '\nA biomarker file was uploaded; it is attached'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ <h2>Biomarker(s) to Submit</h2>
</div>
</div>

<div class='row'>
<div class='{{form.associated_publication.css_classes}} mb-3 form-group col-sm-12'>
{{form.associated_publication.label_tag}}
{{form.associated_publication.errors}}
{{form.associated_publication}}
<div class='form-text'>{{form.associated_publication.help_text|safe}}</div>
</div>
</div>

<div class='row'>
<div class='{{form.captcha.css_classes}} mb-3 form-group col-sm-4'>
{{form.captcha.label_tag}}
Expand Down

0 comments on commit 36de7b5

Please sign in to comment.