use flask flash for notifications
This commit is contained in:
@@ -1,18 +1,11 @@
|
||||
{% extends "workspaces/base.html" %}
|
||||
|
||||
{% from "components/icon.html" import Icon %}
|
||||
{% from "components/alert.html" import Alert %}
|
||||
{% from "components/text_input.html" import TextInput %}
|
||||
|
||||
|
||||
{% block workspace_content %}
|
||||
|
||||
{% if form.errors %}
|
||||
{{ Alert('There were some errors',
|
||||
message="<p>Please see below.</p>",
|
||||
level='error'
|
||||
) }}
|
||||
{% endif %}
|
||||
{% include "fragments/flash.html" %}
|
||||
|
||||
<form method="POST" action="{{ url_for('workspaces.edit_workspace', workspace_id=workspace.id) }}" autocomplete="false">
|
||||
{{ form.csrf_token }}
|
||||
|
@@ -4,14 +4,11 @@
|
||||
{% from "components/modal.html" import Modal %}
|
||||
{% from "components/selector.html" import Selector %}
|
||||
{% from "components/options_input.html" import OptionsInput %}
|
||||
{% from "components/alert.html" import Alert %}
|
||||
{% from "components/confirmation_button.html" import ConfirmationButton %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if member.has_dod_id_error %}
|
||||
{{ Alert('CAC ID Error', message='The member attempted to accept this invite, but their CAC ID did not match the CAC ID you specified on the invite. Please confirm that the DOD ID is accurate.', level='error') }}
|
||||
{% endif %}
|
||||
{% include "fragments/flash.html" %}
|
||||
|
||||
<form method="POST" action="{{ url_for('workspaces.update_member', workspace_id=workspace.id, member_id=member.user_id) }}" autocomplete="false">
|
||||
{{ form.csrf_token }}
|
||||
|
@@ -1,7 +1,6 @@
|
||||
{% extends "workspaces/base.html" %}
|
||||
|
||||
{% from "components/empty_state.html" import EmptyState %}
|
||||
{% from "components/alert.html" import Alert %}
|
||||
{% from "components/icon.html" import Icon %}
|
||||
|
||||
{% block workspace_content %}
|
||||
@@ -21,53 +20,7 @@
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if new_member %}
|
||||
{% set message -%}
|
||||
<p>{{ new_member.user_name }} was successfully invited via email to this workspace. They do not yet have access to any environments.</p>
|
||||
<p><a href="{{ url_for('workspaces.update_member', workspace_id=workspace.id, member_id=new_member.user_id) }}">Add environment access.</a></p>
|
||||
{%- endset %}
|
||||
|
||||
{{ Alert('Member added successfully',
|
||||
message=message,
|
||||
level='success'
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
{% if resent_invitation_to %}
|
||||
{% set message -%}
|
||||
<p>Successfully sent a new invitation to {{ resent_invitation_to }}.</p>
|
||||
{%- endset %}
|
||||
|
||||
{{ Alert('Invitation resent',
|
||||
message=message,
|
||||
level='success'
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
{% if revoked_member_name %}
|
||||
{% set message -%}
|
||||
<p>Removed {{ revoked_member_name }} from this workspace.</p>
|
||||
{%- endset %}
|
||||
|
||||
{{ Alert('Removed workspace access',
|
||||
message=message,
|
||||
level='success'
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
{% set member_name = request.args.get("memberName") %}
|
||||
{% set updated_role = request.args.get("updatedRole") %}
|
||||
{% if updated_role %}
|
||||
{% set message -%}
|
||||
<p>{{ member_name }}'s role was successfully updated to {{ updated_role }}</p>
|
||||
{%- endset %}
|
||||
|
||||
{{ Alert('Workspace role updated successfully',
|
||||
message=message,
|
||||
level='success'
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
{% include "fragments/flash.html" %}
|
||||
|
||||
<members-list
|
||||
inline-template
|
||||
|
@@ -1,5 +1,4 @@
|
||||
{% from "components/icon.html" import Icon %}
|
||||
{% from "components/alert.html" import Alert %}
|
||||
{% from "components/empty_state.html" import EmptyState %}
|
||||
|
||||
{% extends "workspaces/base.html" %}
|
||||
|
@@ -8,14 +8,7 @@
|
||||
{% block workspace_content %}
|
||||
|
||||
{% set modalName = "newProjectConfirmation" %}
|
||||
{% if request.args.get("newWorkspace") %}
|
||||
{{ Alert('Workspace created!',
|
||||
message="\
|
||||
<p>You are now ready to create projects and environments within the JEDI Cloud.</p>
|
||||
",
|
||||
level='success'
|
||||
) }}
|
||||
{% endif %}
|
||||
{% include "fragments/flash.html" %}
|
||||
|
||||
<new-project inline-template v-bind:initial-data='{{ form.data|tojson }}' modal-name='{{ modalName }}'>
|
||||
<form method="POST" action="{{ url_for('workspaces.create_project', workspace_id=workspace.id) }}" v-on:submit="handleSubmit">
|
||||
|
Reference in New Issue
Block a user