diff --git a/opentech/apply/funds/templates/funds/includes/status_bar.html b/opentech/apply/funds/templates/funds/includes/status_bar.html index 5134aa5b26007585025b7450ac967460aad6f03e..042260bda01a8ae7210d619585ae4b3ffc6afdf9 100644 --- a/opentech/apply/funds/templates/funds/includes/status_bar.html +++ b/opentech/apply/funds/templates/funds/includes/status_bar.html @@ -9,14 +9,14 @@ {% endif %}"> <span class="status-bar__tooltip" {% if phase.step != current_phase.step %} - {% if public %} - {% if phase.step > current_phase.step %} - data-title="{{ phase.future_name }}" aria-label="{{ current_phase.future_name }}" + {% if phase.step > current_phase.step %} + data-title="{{ phase.future_name }}" aria-label="{{ current_phase.future_name }}" + {% else %} + {% if public %} + data-title="{{ phase.public_name }}" aria-label="{{ phase.public_name }}" {% else %} - data-title="{{ phase.public_name }}" aria-label="{{ phase.public_name }}" + data-title="{{ phase }}" aria-label="{{ phase }}" {% endif %} - {% else %} - data-title="{{ phase }}" aria-label="{{ phase }}" {% endif %} {% else %} {% if public %} diff --git a/opentech/apply/funds/workflow.py b/opentech/apply/funds/workflow.py index 835d6be56120f5414daaeb4288de6caf6e7b26ee..f6336b9fc731b51710d58a54a3fdd436f6b74da4 100644 --- a/opentech/apply/funds/workflow.py +++ b/opentech/apply/funds/workflow.py @@ -72,8 +72,13 @@ class Phase: def __init__(self, name, display, stage, permissions, step, public=None, future=None, transitions=dict()): self.name = name self.display_name = display + if public and future: + # This prevent having to check that the display name fallback is ok for the + # public to see + raise ValueError("Cant provide both a future and a public name") + self.public_name = public or self.display_name - self.future_name = future or self.public_name + self.future_name = future or self.display_name self.stage = stage self.permissions = Permissions(permissions) self.step = step