fixing form handling for relationships
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{{ c['config']['project_name'] }}{% block title %}{% endblock %}</title>
|
||||
<meta name="og:provider_name" content="{{ c['config']['project_name'] }}">
|
||||
<link rel='stylesheet' href="{{c['config']['static_url']}}/styles.css" />
|
||||
<title>{{ c.config.project_name }}{% block title %}{% endblock %}</title>
|
||||
<meta name="og:provider_name" content="{{ c.config.project_name }}">
|
||||
<link rel='stylesheet' href="{{c.routes.static}}/styles.css" />
|
||||
{% block headers %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
<h1>{{ c['record'].name }}</h1>
|
||||
|
||||
<form name="character_sheet" method="post" novalidate class="form">
|
||||
{{ c['form'].csrf_token }}
|
||||
{{ c.form.csrf_token }}
|
||||
|
||||
{% if 'process' in c['form'].errors %}
|
||||
Error: {{ c['form'].errors['process'] |join(',') }}
|
||||
{% if 'process' in c.form.errors %}
|
||||
Error: {{ c.form.errors.process |join(',') }}
|
||||
{% endif %}
|
||||
<ul>
|
||||
{% for field in c['form'] %}
|
||||
{% for field in c.form %}
|
||||
<li>{{ field.label }}: {{ field }} {{ field.errors|join(',') }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{% macro build_list(c) %}
|
||||
<div style='float:left; min-height: 90%; margin-right:5em;'>
|
||||
<ul>
|
||||
<li><a href="{{c['routes']['sheet']}}">Create a Character</a></li>
|
||||
{% for rec in c['all_records'] %}
|
||||
<li><a href="{{c['routes']['sheet']}}/{{rec['uri']}}">{{ rec['uri'] }}</a></li>
|
||||
<li><a href="{{ c.routes.sheet }}">Create a Character</a></li>
|
||||
{% for rec in c.all_records %}
|
||||
<li><a href="{{ c.routes.sheet }}/{{ rec.uri }}">{{ rec.uri }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user