Procedural node add and edit forms
This commit is contained in:
@@ -2,28 +2,25 @@
|
||||
|
||||
{% block body %}
|
||||
<div class="col-md-9">
|
||||
<h2>Add Node type</h2>
|
||||
<h2>Add {{ node_type }}</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<form method="POST" action="{{url_for('nodes.add')}}">
|
||||
{{ form.hidden_tag() }}
|
||||
<div class="form-group">
|
||||
{{ form.name.label }}
|
||||
{{ form.name(size=20, class='form-control') }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ form.description.label }}
|
||||
{{ form.description(size=20, class='form-control') }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ form.url.label }}
|
||||
{{ form.url(size=20, class='form-control') }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ form.is_extended.label }}
|
||||
{{ form.is_extended(class='form-control') }}
|
||||
</div>
|
||||
<input class="btn btn-default" type="submit" value="Add Node Type">
|
||||
<form method="POST" action="{{url_for('nodes.add', node_type=node_type)}}">
|
||||
{% for field in form %}
|
||||
{% if field.name == 'csrf_token' %}
|
||||
{{ field }}
|
||||
{% else %}
|
||||
{% if field.type == "HiddenField" %}
|
||||
{{ field }}
|
||||
{% else %}
|
||||
<div class="form-group">
|
||||
{{ field.label }}
|
||||
{{ field(class='form-control') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<input class="btn btn-default" type="submit" value="Create {{ node_type.name }}">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user