Edit workspace #160300728
This commit is contained in:
dandds
2018-09-17 15:45:35 -04:00
committed by GitHub
11 changed files with 202 additions and 9 deletions

View File

@@ -35,5 +35,15 @@
href=url_for("workspaces.workspace_reports", workspace_id=workspace.id),
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/reports')
) }}
{% if user_can(permissions.EDIT_WORKSPACE_INFORMATION) %}
{{ SidenavItem(
"Workspace Settings",
href=url_for("workspaces.workspace", workspace_id=workspace.id),
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/edit'),
subnav=None
) }}
{% endif %}
</ul>
</nav>

View File

@@ -0,0 +1,43 @@
{% 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 %}
<form method="POST" action="{{ url_for('workspaces.edit_workspace', workspace_id=workspace.id) }}" autocomplete="false">
{{ form.csrf_token }}
<div class="panel">
<div class="panel__heading">
<h1>Workspace Settings</h1>
</div>
<div class="panel__content">
{{ TextInput(form.name, validation="workspaceName") }}
</div>
</div>
<div class='action-group'>
<button type="submit" class="usa-button usa-button-big usa-button-primary" tabindex="0">Save</button>
<a href='{{ url_for("workspaces.workspace_projects", workspace_id=workspace.id) }}' class='action-group__action icon-link'>
{{ Icon('x') }}
<span>Cancel</span>
</a>
</div>
</form>
{% endblock %}