view piecrust/admin/templates/create_page.html @ 1184:386744f74c4b

admin: Allow selecting a scaffolding template. Templates available to the prepare command are now also available in the admin panel.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 21 May 2020 22:11:28 -0700
parents 5e91bc0e3b4d
children
line wrap: on
line source

{% set title = 'Create' %}

{% extends 'layouts/default.html' %}

{% block content %}
<form action="{{url_postback}}" method="POST" class="ft-create-form">
    {% for field in fields %}
    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <div class="form-group">
                <div class="input-group input-group-lg">
                    <span class="input-group-addon" id="meta-{{field.name}}">{{field.display_name}}</span>
                    <input type="text" class="form-control" value="{{field.value}}" aria-describedby="meta-{{field.name}}" name="meta-{{field.name}}" />
                </div>
            </div>
        </div>
    </div>

    {% endfor %}

    {% if content_templates %}
    <label for="content-template">Content Template:</label>
    <select name="content-template" id="content-template">
        {% for ctpl in content_templates %}
        <option value="{{ctpl}}">{{ctpl}}</option>
        {% endfor %}
    </select>
    {% endif %}

    <input type="hidden" name="source_name" value="{{source_name}}" />

    <div class="row">
        <div class="col-md-6 col-md-offset-1">
            <a class="btn btn-danger" href="{{url_cancel}}">Cancel</a>
        </div>
        <div class="col-md-4">
            <button type="submit" name="do_save" class="btn btn-primary btn-lg pull-right">Create and Edit</button>
        </div>
    </div>
</form>
{% endblock %}