<%inherit file="/template.html" />
<%namespace name="components" file="/components.html"/>

<%def name="title()">${_("Implementation: %s") % c.proposal.title}</%def>

<%def name="breadcrumbs()">
    ${h.selection.breadcrumbs(None)|n}
</%def>

<%block name="headline">
${tiles.proposal.header(c.proposal, active='implementation')}
</%block>

<%block name="main_content">
    <h2>${_("Propose a new norm")}</h2>
    <div class="infobox">
        ${_("Create a new norm that you want to relate to. The norm will be created without any status quo. You can then add a text variant of that norm, specifying the change you want to implement.")}
    </div>
    <form name="create_page" class="inplace" method="POST" action="/page">
        ${h.field_token()|n}
        <input type="hidden" value="${c.proposal.id}" name="proposal" />
        <input type="hidden" value="" name="text" />
        <input type="hidden" value="" name="tags" />

        <fieldset>
            <legend>${_("Norm title")}</legend>
            <div class="input_wrapper page_title">
                <input type="text" class="title" name="title" placeholder="${_('New norm title')}" autofocus />
            </div>
        </fieldset>

        <label for="parent">${_("Parent page:")}</label>
        ${tiles.page.select_page(field_name="parent", functions=model.Page.PARENT_FUNCTIONS)}
        <span class="hint">${_("The new norm will be categorized under the specified parent page.")}
        </span>

        <div class="input_wrapper submit">
            ${components.savebox(h.entity_url(c.proposal))}
        </div>
    </form>

    <h3>${_("Have you checked for exisiting norms?")}</h3>
    <a class="button" href="${h.proposal.url(c.proposal, member='implementation/include')}">
        ${_("Include an existing norm instead")}
    </a>
</%block>
