link-services-to-organisations

This commit is contained in:
chrisw
2018-02-12 09:26:13 +00:00
parent 01a2852a69
commit 1450138b9c
12 changed files with 255 additions and 17 deletions

View File

@@ -14,11 +14,12 @@
<h1 class="heading-large">{{ '{} an organisation'.format('Update' if organisation else 'Create')}}</h1>
<form method="post">
{{textbox(form.name)}}
{{ page_footer(
'Save',
back_link=url_for('.organisations'),
back_link_text='Back to organisations',
) }}
{{textbox(form.name)}}
{{ page_footer(
'Save',
back_link=url_for('.organisations'),
back_link_text='Back to organisations',
) }}
</form>
{% endblock %}

View File

@@ -15,7 +15,7 @@
Organisations
</h1>
<nav class="browse-list">
<ul>
<ul>
{% for org in organisations %}
<li class="browse-list-item">
<a href="{{ url_for('main.view_organisation', org_id=org['id']) }}" class="browse-list-link">{{ org['name'] }}</a>
@@ -24,7 +24,7 @@
{% endif %}
</li>
{% endfor %}
</ul>
</ul>
</nav>
<div>
<a href="{{ url_for('main.add_organisation') }}" class="browse-list-link">Create an organisation</a>

View File

@@ -12,12 +12,9 @@
{% block platform_admin_content %}
<h1 class="heading-large">
<div>{{ organisation['name'] }}</div>
{{ organisation['name'] }}
</h1>
<div class="grid-row">
<div class="column-three-quarters">
[List of services]
</div>
</div>
<p> [List of services] </p>
{% endblock %}

View File

@@ -255,6 +255,11 @@
field_headings_visible=False,
caption_visible=False
) %}
{% call row() %}
{{ text_field('Organisation')}}
{{ optional_text_field(organisation or 'Not Set') }}
{{ edit_field('Change', url_for('.link_service_to_organisation', service_id=current_service.id)) }}
{% endcall %}
{% call row() %}
{{ text_field('Organisation type')}}
{{ optional_text_field(

View File

@@ -0,0 +1,26 @@
{% extends "withnav_template.html" %}
{% from "components/radios.html" import radios %}
{% from "components/page-footer.html" import page_footer %}
{% block service_page_title %}
Link service to organisation
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row bottom-gutter">
<div class="column-two-thirds">
<h1 class="heading-large">
Link service to organisation
</h1>
<form method="post">
{{ radios(form.organisations) }}
{{ page_footer(
'Save',
back_link=url_for('.service_settings', service_id=current_service.id),
back_link_text='Back to settings'
) }}
</form>
</div>
</div>
{% endblock %}