Merge pull request #294 from dod-ccpo/edit-workspace-#160300728
Edit workspace #160300728
This commit is contained in:
@@ -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>
|
||||
|
43
templates/workspaces/edit.html
Normal file
43
templates/workspaces/edit.html
Normal 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 %}
|
Reference in New Issue
Block a user