Formatting

This commit is contained in:
leigh-mil 2018-10-16 14:59:52 -04:00
parent 2455618268
commit 86cf568e5b
2 changed files with 17 additions and 20 deletions

View File

@ -181,10 +181,7 @@ def create_project(workspace_id):
def edit_project(workspace_id, project_id): def edit_project(workspace_id, project_id):
workspace = Workspaces.get_for_update_projects(g.current_user, workspace_id) workspace = Workspaces.get_for_update_projects(g.current_user, workspace_id)
project = Projects.get(g.current_user, workspace, project_id) project = Projects.get(g.current_user, workspace, project_id)
form = ProjectForm( form = ProjectForm(name=project.name, description=project.description)
name=project.name,
description=project.description,
)
return render_template( return render_template(
"workspaces/projects/edit.html", workspace=workspace, project=project, form=form "workspaces/projects/edit.html", workspace=workspace, project=project, form=form

View File

@ -4,22 +4,22 @@
{% set title_text = 'Edit {} project'.format(project.name) if project else 'Add a new project' %} {% set title_text = 'Edit {} project'.format(project.name) if project else 'Add a new project' %}
{{ form.csrf_token }} {{ form.csrf_token }}
<div class="panel"> <div class="panel">
<div class="panel__heading panel__heading--grow"> <div class="panel__heading panel__heading--grow">
<h1>{{ title_text }}</h1> <h1>{{ title_text }}</h1>
</div>
<div class="panel__content">
<p>
AT-AT allows you to organize your workspace into multiple projects, each of which may have environments.
</p>
{{ TextInput(form.name) }}
{{ TextInput(form.description, paragraph=True) }}
</div>
</div> </div>
<div> {# this extra div prevents this bug: https://www.pivotaltracker.com/story/show/160768940 #} <div class="panel__content">
<div v-cloak v-for="title in errors" :key="title"> <p>
{{ Alert(message=None, level="error", vue_template=True) }} AT-AT allows you to organize your workspace into multiple projects, each of which may have environments.
</div> </p>
{{ TextInput(form.name) }}
{{ TextInput(form.description, paragraph=True) }}
</div> </div>
</div>
<div> {# this extra div prevents this bug: https://www.pivotaltracker.com/story/show/160768940 #}
<div v-cloak v-for="title in errors" :key="title">
{{ Alert(message=None, level="error", vue_template=True) }}
</div>
</div>