Merge branch 'main' of https://github.com/GSA/notifications-admin into notify-786

This commit is contained in:
Andrew Shumway
2023-11-17 11:19:50 -07:00
7 changed files with 45 additions and 109 deletions

View File

@@ -6,7 +6,7 @@ from app import service_api_client
from app.formatters import email_safe
from app.main import main
from app.main.forms import CreateServiceForm
from app.utils.user import user_is_gov_user, user_is_platform_admin
from app.utils.user import user_is_gov_user, user_is_logged_in
def _create_service(service_name, organization_type, email_from, form):
@@ -42,7 +42,7 @@ def _create_example_template(service_id):
@main.route("/add-service", methods=["GET", "POST"])
@user_is_gov_user
@user_is_platform_admin
@user_is_logged_in
def add_service():
default_organization_type = current_user.default_organization_type
if default_organization_type is None:

View File

@@ -689,7 +689,6 @@ def format_stats_by_service(services):
"name": service["name"],
"stats": service["statistics"],
"restricted": service["restricted"],
"research_mode": service["research_mode"],
"created_at": service["created_at"],
"active": service["active"],
}

View File

@@ -1,17 +1,12 @@
{% macro tick_cross(yes, label, truthy_hint='Can', falsey_hint='Cannot') %}
<li>
{% if yes %}
<li>
<span class="tick-cross-tick">
<span class="usa-sr-only">{{ truthy_hint }}</span>
{{ label}}
</span>
{% else %}
<span class="tick-cross-cross">
<span class="usa-sr-only">{{ falsey_hint }}</span>
{{ label}}
</span>
</li>
{% endif %}
</li>
{% endmacro %}
{% macro tick_cross_done_not_done(yes, label) %}