diff --git a/hawc/apps/study/templates/study/study_form.html b/hawc/apps/study/templates/study/study_form.html index b3c0d65c83..311bb75d8f 100644 --- a/hawc/apps/study/templates/study/study_form.html +++ b/hawc/apps/study/templates/study/study_form.html @@ -1,14 +1,27 @@ {% extends 'assessment-rooted.html' %} {% load crispy_forms_tags %} +{% load bs4 %} {% block content %} - {% crispy form %} +{% if manual_entry_warning %} +{% alert warning %} +

You can continue to manually enter a study if you wish. However, instead of manually +entering reference information, we recommend importing the reference from PubMed or HERO +using one of these approaches instead:

+ +

This requires less work, and ensures that we have links to the reference throughout your assessment.

+{% endalert %} +{% endif %} +{% crispy form %} {% endblock %} {% block extrajs %} diff --git a/hawc/apps/study/views.py b/hawc/apps/study/views.py index f622951496..cee962a87e 100644 --- a/hawc/apps/study/views.py +++ b/hawc/apps/study/views.py @@ -75,6 +75,11 @@ class ReferenceStudyCreate(EnsurePreparationStartedMixin, BaseCreate): model = models.Study form_class = forms.ReferenceStudyForm + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["manual_entry_warning"] = True + return context + def post_object_save(self, form): search = apps.get_model("lit", "Search").objects.get_manually_added(self.assessment) self.object.searches.add(search) @@ -90,6 +95,11 @@ class IdentifierStudyCreate(ReferenceStudyCreate): def get_success_url(self): return reverse_lazy("study:update", args=(self.object.id,)) + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["manual_entry_warning"] = False + return context + class StudyDetail(BaseDetail): model = models.Study