add form for editing workspace name

This commit is contained in:
dandds
2018-09-17 13:10:37 -04:00
parent 021871ec16
commit c3f89ba149
6 changed files with 73 additions and 10 deletions

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>Edit Workspace</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">Submit</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 %}