mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-31 11:49:58 -04:00
rename choose_service to choose_account
This commit is contained in:
@@ -20,7 +20,7 @@ from app.main.views import ( # noqa
|
||||
new_password,
|
||||
styleguide,
|
||||
user_profile,
|
||||
choose_service,
|
||||
choose_account,
|
||||
api_keys,
|
||||
manage_users,
|
||||
invites,
|
||||
|
||||
@@ -6,21 +6,21 @@ from app.main import main
|
||||
from app.utils import is_gov_user
|
||||
|
||||
|
||||
@main.route("/services")
|
||||
@main.route("/accounts")
|
||||
@login_required
|
||||
def choose_service():
|
||||
def choose_account():
|
||||
orgs_and_services = user_api_client.get_organisations_and_services_for_user(current_user)
|
||||
|
||||
return render_template(
|
||||
'views/choose-service.html',
|
||||
'views/choose-account.html',
|
||||
organisations=orgs_and_services['organisations'],
|
||||
services_without_organisations=orgs_and_services['services_without_organisations'],
|
||||
can_add_service=is_gov_user(current_user.email_address)
|
||||
)
|
||||
|
||||
|
||||
@main.route("/services-or-dashboard")
|
||||
def show_all_services_or_dashboard():
|
||||
@main.route("/accounts-or-dashboard")
|
||||
def show_accounts_or_dashboard():
|
||||
|
||||
if not current_user.is_authenticated:
|
||||
return redirect(url_for('.index'))
|
||||
@@ -39,4 +39,4 @@ def show_all_services_or_dashboard():
|
||||
if len(current_user.organisations) == 1 and not current_user.services:
|
||||
return redirect(url_for('.organisation_dashboard', org_id=current_user.organisations[0]))
|
||||
|
||||
return redirect(url_for('.choose_service'))
|
||||
return redirect(url_for('.choose_account'))
|
||||
@@ -14,7 +14,7 @@ from app.main.views.sub_navigation_dictionaries import features_nav
|
||||
@main.route('/')
|
||||
def index():
|
||||
if current_user and current_user.is_authenticated:
|
||||
return redirect(url_for('main.choose_service'))
|
||||
return redirect(url_for('main.choose_account'))
|
||||
return render_template('views/signedout.html')
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ from app.main.views.verify import activate_user
|
||||
@main.route('/register', methods=['GET', 'POST'])
|
||||
def register():
|
||||
if current_user and current_user.is_authenticated:
|
||||
return redirect(url_for('main.choose_service'))
|
||||
return redirect(url_for('main.choose_account'))
|
||||
|
||||
form = RegisterUserForm()
|
||||
if form.validate_on_submit():
|
||||
@@ -101,5 +101,5 @@ def _do_registration(form, send_sms=True, send_email=True, organisation_id=None)
|
||||
@main.route('/registration-continue')
|
||||
def registration_continue():
|
||||
if not session.get('user_details'):
|
||||
return redirect(url_for('.show_all_services_or_dashboard'))
|
||||
return redirect(url_for('.show_accounts_or_dashboard'))
|
||||
return render_template('views/registration-continue.html')
|
||||
|
||||
@@ -18,7 +18,7 @@ from app.main.forms import LoginForm
|
||||
@main.route('/sign-in', methods=(['GET', 'POST']))
|
||||
def sign_in():
|
||||
if current_user and current_user.is_authenticated:
|
||||
return redirect(url_for('main.choose_service'))
|
||||
return redirect(url_for('main.choose_account'))
|
||||
|
||||
form = LoginForm()
|
||||
|
||||
|
||||
@@ -117,4 +117,4 @@ def redirect_when_logged_in(user_id):
|
||||
if len(services) == 1:
|
||||
return redirect(url_for('main.service_dashboard', service_id=services[0]['id']))
|
||||
else:
|
||||
return redirect(url_for('main.choose_service'))
|
||||
return redirect(url_for('main.choose_account'))
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
{% set global_header_text = "GOV.UK <span id='product-name'>Notify</span>"|safe %}
|
||||
|
||||
{% set homepage_url = url_for('main.show_all_services_or_dashboard') %}
|
||||
{% set homepage_url = url_for('main.show_accounts_or_dashboard') %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}{% endblock %}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="navigation-service-name">
|
||||
{{ current_org.name }}
|
||||
</div>
|
||||
<a href="{{ url_for('main.choose_service') }}" class="navigation-service-switch">Switch service</a>
|
||||
<a href="{{ url_for('main.choose_account') }}" class="navigation-service-switch">Switch service</a>
|
||||
</div>
|
||||
<div class="grid-row">
|
||||
<div class="column-one-quarter">
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{% extends "withoutnav_template.html" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
Choose service
|
||||
Choose account
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
Choose service
|
||||
Choose account
|
||||
</h1>
|
||||
|
||||
{% for org in organisations %}
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="navigation-service-name">
|
||||
{{ current_service.name }}
|
||||
</div>
|
||||
<a href="{{ url_for('main.choose_service') }}" class="navigation-service-switch">Switch service</a>
|
||||
<a href="{{ url_for('main.choose_account') }}" class="navigation-service-switch">Switch service</a>
|
||||
</div>
|
||||
<div class="grid-row">
|
||||
{% if help %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div id="content">
|
||||
{% if current_service %}
|
||||
<div class="navigation-service">
|
||||
<a href="{{ url_for('main.show_all_services_or_dashboard') }}">Back to {{ current_service.name }}</a>
|
||||
<a href="{{ url_for('main.show_accounts_or_dashboard') }}">Back to {{ current_service.name }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<main role="main">
|
||||
|
||||
Reference in New Issue
Block a user