Skip to content

Commit

Permalink
chore(viewmodels): remove agency links helper
Browse files Browse the repository at this point in the history
Button.link no longer needed either
  • Loading branch information
thekaveman committed Jul 13, 2023
1 parent b6c4336 commit 37e2943
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions benefits/core/viewmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ def __init__(self, **kwargs):
self.target = kwargs.get("target")
self.rel = kwargs.get("rel")

@staticmethod
def agency_contact_links(agency):
"""Create link buttons for agency contact information."""
return [
Button.link(label=agency.long_name, text=agency.phone, url=f"tel:{agency.phone}"),
Button.link(text=agency.info_url, url=agency.info_url, target="_blank", rel="noopener noreferrer"),
]

@staticmethod
def home(request, text=None):
"""Create a button back to this session's origin."""
Expand All @@ -53,14 +45,6 @@ def home(request, text=None):

return Button.primary(text=text, url=session.origin(request))

@staticmethod
def link(**kwargs):
classes = kwargs.pop("classes", [])
if isinstance(classes, str):
classes = classes.split(" ")
classes.insert(0, "btn-link")
return Button(classes=classes, **kwargs)

@staticmethod
def primary(**kwargs):
classes = kwargs.pop("classes", [])
Expand Down

0 comments on commit 37e2943

Please sign in to comment.