Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Study Type Help Text #656

Merged
merged 3 commits into from
Jul 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion hawc/apps/study/forms.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from crispy_forms import layout as cfl
from django import forms
from django.db.models import Q
from django.forms.widgets import TextInput
Expand Down Expand Up @@ -70,9 +71,21 @@ def setHelper(self, inputs={}):
if "authors" in self.fields:
helper.add_row("authors", 2, "col-md-6")
helper.add_row("short_citation", 2, "col-md-6")
helper.add_row("bioassay", 4, "col-md-3")
helper.add_row("bioassay", 4, ["col-md-3", "col-md-3", "col-md-3", "col-md-3"])
helper.add_row("coi_reported", 2, "col-md-6")
helper.add_row("funding_source", 2, "col-md-6")
helper.add_row("contact_author", 2, "col-md-6")
study_type_idx = helper.find_layout_idx_for_field_name("bioassay")
helper.layout[study_type_idx].css_class = "px-3"
helper.layout.insert(
study_type_idx,
cfl.HTML(
"""<div class="form-row">
<p class="mb-2"><b>Study Type(s)</b></p>
<p class="text-muted">Select the type(s) of data contained in this study. Study evaluation and data extraction fields will change depending on the selection. Modifying values after proceeding with study evaluation and/or data extraction may cause data to be removed.</p></div>
"""
),
)
return helper

def save(self, commit=True):
Expand Down