Skip to content

Commit

Permalink
text updates
Browse files Browse the repository at this point in the history
  • Loading branch information
shapiromatron committed Sep 10, 2024
1 parent 262144b commit dba741d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
6 changes: 3 additions & 3 deletions hawc/apps/animal/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,9 @@ def helper(self):
if vocab_enabled:
vocab_id = self.instance.assessment.vocabulary
vocab_url = VocabularyNamespace(vocab_id).display_url
vocab = f"""&nbsp;The <a href="{vocab_url}">{VocabularyNamespace(vocab_id).display_name}</a> is enabled for this assessment. Browse to view controlled terms, and whenever possible please use these terms."""
vocab = f"""The <a href="{vocab_url}">{VocabularyNamespace(vocab_id).display_name}</a> is enabled for this assessment. Browse to view controlled terms, and whenever possible please use these terms."""
else:
vocab = f"""&nbsp;A controlled vocabulary is not enabled for this assessment. However, you can still browse the <a href="{reverse('vocab:ehv-browse')}">EHV</a> to see if this vocabulary would be a good fit for your assessment."""
vocab = f"""A controlled vocabulary is not enabled for this assessment. However, you can still browse the <a href="{reverse('vocab:ehv-browse')}">EHV</a> to see if this vocabulary would be a good fit for your assessment."""

if self.instance.id:
inputs = {
Expand All @@ -466,7 +466,7 @@ def helper(self):
else:
inputs = {
"legend_text": "Create new endpoint",
"help_text": f"""Create a new endpoint. An endpoint should describe one measure-of-effect in the study. It may or may not contain quantitative data.{vocab}""",
"help_text": f"""Create a new endpoint. An endpoint should describe one measure-of-effect in the study. It may or may not contain quantitative data. {vocab}""",
"cancel_url": self.instance.animal_group.get_absolute_url(),
}

Expand Down
11 changes: 2 additions & 9 deletions hawc/apps/assessment/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,8 @@ def user_is_project_manager_or_higher(self, user) -> bool:
perms = self.get_permissions()
return perms.project_manager_or_higher(user)

def get_vocabulary_display(self) -> str:
# override default method
if self.vocabulary:
return VocabularyNamespace(self.vocabulary).display_name
else:
return ""

def get_vocabulary_url(self) -> str | None:
return VocabularyNamespace(self.vocabulary).display_url if self.vocabulary else None
def get_vocabulary_display(self) -> str | None:
return VocabularyNamespace(self.vocabulary).display_name if self.vocabulary else None

def get_noel_names(self) -> NoelNames:
if self.noel_name == constants.NoelName.NEL:
Expand Down

0 comments on commit dba741d

Please sign in to comment.