Work in progress, all tests passing and implemented mocks for services_dao.

This commit is contained in:
Nicholas Staples
2016-01-15 17:46:09 +00:00
parent 262bbbac45
commit 4e2019c949
40 changed files with 189 additions and 164 deletions

View File

@@ -12,7 +12,7 @@ GOV.UK Notify | API keys and documentation
<p>Here's where developers can access information about the API and access keys</p>
{{ page_footer(
back_link=url_for('.dashboard', service_id=service_id),
back_link=url_for('.service_dashboard', service_id=service_id),
back_link_text='Back to dashboard'
) }}

View File

@@ -17,7 +17,7 @@
{% for rejected in upload_result.rejects %}
<p>Line {{rejected.line_number}}: {{rejected.phone }}</a>
{% endfor %}
<p><a href="{{url_for('.sendsms', service_id=service_id)}}" class="button">Go back and resolve errors</a></p>
<p><a href="{{url_for('.send_sms', service_id=service_id)}}" class="button">Go back and resolve errors</a></p>
{% else %}
@@ -26,7 +26,7 @@
{{ page_footer(
button_text = "Send {} text messages".format(upload_result.valid|count),
back_link = url_for(".sendsms", service_id=service_id)
back_link = url_for(".send_sms", service_id=service_id)
)}}
{% if upload_result.valid | count > 6 %}
@@ -56,7 +56,7 @@
{{ page_footer(
button_text = "Send {} text messages".format(upload_result.valid|count),
back_link = url_for(".sendsms", service_id=service_id)
back_link = url_for(".send_sms", service_id=service_id)
)}}
<input type='hidden' name='recipients' value='{{filename}}'>

View File

@@ -14,11 +14,11 @@
{{ browse_list([
{
'title': 'MOT Reminders',
'link': url_for('.dashboard', service_id=123)
'link': url_for('.service_dashboard', service_id=123)
},
{
'title': 'Vehicle Tax',
'link': url_for('.dashboard', service_id=123)
'link': url_for('.service_dashboard', service_id=123)
},
]) }}
{{ browse_list([

View File

@@ -15,7 +15,7 @@ GOV.UK Notify | Edit template
{{ textbox(form.template_body, highlight_tags=True) }}
{{ page_footer(
'Save and continue',
back_link=url_for('.dashboard', service_id=service_id),
back_link=url_for('.service_dashboard', service_id=service_id),
back_link_text='Back to manage templates'
) }}
</form>

View File

@@ -52,10 +52,10 @@ GOV.UK Notify | Notifications activity
]
) %}
{% call field() %}
<a href="{{ url_for('.shownotification', service_id=service_id, job_id=456, notification_id=item.id) }}">{{item.phone}}</a>
<a href="{{ url_for('.view_notification', service_id=service_id, job_id=456, notification_id=item.id) }}">{{item.phone}}</a>
{% endcall %}
{% call field() %}
<a href="{{ url_for('.shownotification', service_id=service_id, job_id=456, notification_id=item.id) }}">{{item.message[:50]}}…</a>
<a href="{{ url_for('.view_notification', service_id=service_id, job_id=456, notification_id=item.id) }}">{{item.message[:50]}}…</a>
{% endcall %}
{% call field(
align='right',

View File

@@ -16,10 +16,10 @@ GOV.UK Notify | Notifications activity
field_headings=['Job', 'File', 'Time', 'Status']
) %}
{% call field() %}
<a href="{{ url_for('.showjob', service_id=service_id, job_id=456) }}">{{ item.file }}</a>
<a href="{{ url_for('.view_job', service_id=service_id, job_id=456) }}">{{ item.file }}</a>
{% endcall %}
{% call field() %}
<a href="{{ url_for('.showjob', service_id=service_id, job_id=456) }}">{{ item.job }}</a>
<a href="{{ url_for('.view_job', service_id=service_id, job_id=456) }}">{{ item.job }}</a>
{% endcall %}
{% call field() %}
{{ item.time }}

View File

@@ -12,7 +12,7 @@ GOV.UK Notify | Manage users
<p>Here's where you can add or remove users of a service.</p>
{{ page_footer(
back_link = url_for('.dashboard', service_id=service_id),
back_link = url_for('.service_dashboard', service_id=service_id),
back_link_text = 'Back to dashboard'
) }}

View File

@@ -26,7 +26,7 @@ GOV.UK Notify | Notifications activity
</div>
{{ page_footer(
back_link = url_for('.showjob', service_id=service_id, job_id=job_id),
back_link = url_for('.view_job', service_id=service_id, job_id=job_id),
back_link_text = 'View other messages in this job'
) }}

View File

@@ -30,10 +30,10 @@
field_headings=['Job', 'File', 'Time', 'Status']
) %}
{% call field() %}
<a href="{{ url_for('.showjob', service_id=service_id, job_id=456) }}">{{ item.file }}</a>
<a href="{{ url_for('.view_job', service_id=service_id, job_id=456) }}">{{ item.file }}</a>
{% endcall %}
{% call field() %}
<a href="{{ url_for('.showjob', service_id=service_id, job_id=456) }}">{{ item.job }}</a>
<a href="{{ url_for('.view_job', service_id=service_id, job_id=456) }}">{{ item.job }}</a>
{% endcall %}
{% call field() %}
{{ item.time }}
@@ -43,7 +43,7 @@
{% endcall %}
{% endcall %}
<p>
<a href={{ url_for('.showjobs', service_id=service_id) }}>See all notifications activity</a>
<a href={{ url_for('.view_jobs', service_id=service_id) }}>See all notifications activity</a>
</p>

View File

@@ -11,10 +11,10 @@
{% call(item) list_table(
[
{'label': 'Name', 'value': current_user.name, 'url': url_for('.userprofile_name')},
{'label': 'Email address', 'value': current_user.email_address, 'url': url_for('.userprofile_email')},
{'label': 'Mobile number', 'value': current_user.mobile_number, 'url': url_for('.userprofile_mobile_number')},
{'label': 'Password', 'value': 'Last changed 1 January 2016, 10:00AM', 'url': url_for('.userprofile_password')},
{'label': 'Name', 'value': current_user.name, 'url': url_for('.user_profile_name')},
{'label': 'Email address', 'value': current_user.email_address, 'url': url_for('.user_profile_email')},
{'label': 'Mobile number', 'value': current_user.mobile_number, 'url': url_for('.user_profile_mobile_number')},
{'label': 'Password', 'value': 'Last changed 1 January 2016, 10:00AM', 'url': url_for('.user_profile_password')},
],
caption='Account settings',
field_headings=['Setting', 'Value', 'Link to change'],

View File

@@ -17,7 +17,7 @@ GOV.UK Notify | Service settings
{{ textbox(form.new_password) }}
{{ page_footer(
'Save',
back_link=url_for('.userprofile'),
back_link=url_for('.user_profile'),
back_link_text="Back to your profile"
) }}
</form>

View File

@@ -21,7 +21,7 @@ GOV.UK Notify | Service settings
{{ textbox(form_field) }}
{{ page_footer(
'Save',
back_link=url_for('.userprofile'),
back_link=url_for('.user_profile'),
back_link_text="Back to your profile"
) }}
</form>

View File

@@ -20,7 +20,7 @@ GOV.UK Notify | Service settings
{{ page_footer(
'Confirm',
destructive=destructive,
back_link=url_for('.userprofile')
back_link=url_for('.user_profile')
) }}
</form>
</div>