Skip to content

Commit

Permalink
Update template page title
Browse files Browse the repository at this point in the history
  • Loading branch information
CaitBarnard committed Oct 28, 2024
1 parent ed0ddb0 commit 167c2e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion forecast/templates/forecast/edit/choose_cost_centre.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% breadcrumb "Choose cost centre" "choose_cost_centre" %}
{% endblock %}

{% block title %}Edit Forecast - Choose Cost Centre{% endblock %}
{% block title %}Edit {{ view.get_page_header }} - Choose Cost Centre{% endblock %}

{% block content %}
<h3 class="govuk-heading-l">My cost centres</h3>
Expand Down
6 changes: 3 additions & 3 deletions forecast/views/edit_select_cost_centre.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ def get_user_cost_centres(self):
return json.dumps(cost_centres)

def get_is_forecast_or_payroll(self):
if "forecast" in self.request.path:
return ["forecast"]
return ["forecast"] if "forecast" in self.request.path else ["payroll"]

return ["payroll"]
def get_page_header(self):
return "Forecast" if "forecast" in self.request.path else "Payroll"

def get_form_kwargs(self):
kwargs = super(ChooseCostCentreView, self).get_form_kwargs()
Expand Down

0 comments on commit 167c2e0

Please sign in to comment.