Don’t allow indexing on service model

Making people use a property is a sure way to make sure they’re spelling
the name of the property correctly, and allows us to easily swap out
properties that call through to the underlying JSON, and properties
which are implemented as methods.
This commit is contained in:
Chris Hill-Scott
2018-10-26 12:13:04 +01:00
parent 780b9bb715
commit e1197c54a5
10 changed files with 17 additions and 12 deletions

View File

@@ -17,7 +17,7 @@
{% for service in organisation_services %}
<li class="browse-list-item">
{% if service.has_permission_to_view %}
<a href="{{ url_for('main.service_dashboard', service_id=service['id']) }}" class="browse-list-link">{{ service['name'] }}</a>
<a href="{{ url_for('main.service_dashboard', service_id=service.id) }}" class="browse-list-link">{{ service['name'] }}</a>
{% else %}
{{ service['name'] }}
{% endif %}

View File

@@ -58,7 +58,7 @@
<p>
Set up separate email addresses to receive replies
from your users.
{% if current_service.restricted and not reply_to_email_addresses %}
{% if current_service.trial_mode and not reply_to_email_addresses %}
Your service cant go live until youve added at least one
reply-to address.
{% endif %}

View File

@@ -22,7 +22,7 @@
Set up a separate email address to receive replies from
your users, then enter it here.
</p>
{% if current_service.restricted %}
{% if current_service.trial_mode %}
<p>
Your service cant go live until youve done this.
</p>

View File

@@ -19,7 +19,7 @@
<p>When you create a GOV.UK Notify account, youll start in trial mode. This lets you try out the service, but has some restrictions in place.</p>
<p>
You can remove these restrictions by
{% if current_service and current_service.restricted %}
{% if current_service and current_service.trial_mode %}
<a href="{{ url_for('.request_to_go_live', service_id=current_service.id) }}">requesting to go live</a>.
{% else %}
going live.