<%inherit file="/template.html" />
<%namespace name="components" file="/components.html"/>
<%namespace name="badge_tiles" file="/badge/tiles.html"/>
<%def name="title()">${_("Edit badges for %s") % c.proposal.title}</%def>

<%def name="breadcrumbs()">
    ${h.proposal.breadcrumbs(c.proposal)|n} &raquo; ${_("Edit Badges")}
</%def>

<%block name="main_content">

## NOTE: Don't use entity_url in href due to same-origin-policy issue (#621)
<form name="settings" class="inplace" method="POST"
    action="${'/instance/%s/update_badges' % c.page_instance.key}">

    ${h.field_token()|n}
    <h3>Badges</h3>

    %if c.badges:
    <ul class="nobullet">
        %for badge in c.badges:
        <li>
            <label>
                <input type="checkbox" value="${badge.id}"
                       name="badge" />
                ${badge_tiles.badge(badge)}
            </label>
        </li>
        %endfor
    </ul>
    %else:
    <p>${_(u"No Badges")}</p>
    %endif

    ${components.savebox(h.base_url("/instance/%s" % c.page_instance.key))}
</form>

</%block>

<%inherit file="/template.html" />
<%namespace name="components" file="/components.html"/>
<%namespace name="badge_tiles" file="/badge/tiles.html"/>
<%def name="title()">${_("Edit badges for %s") % c.page_instance.title}</%def>

<%def name="breadcrumbs()">
    ${h.instance.breadcrumbs(c.page_instance)|n} &raquo; ${_("Edit Badges")}
</%def>

<%block name="main_content">

## NOTE: Don't use entity_url in href due to same-origin-policy issue (#621)
<form name="settings" class="inplace" method="POST"
    action="${'/instance/%s/update_badges' % c.page_instance.key}">

    ${h.field_token()|n}
    <h3>Badges</h3>

    %if c.badges:
    <ul class="nobullet">
        %for badge in c.badges:
        <li>
            <label>
                <input type="checkbox" value="${badge.id}"
                       name="badge" />
                ${badge_tiles.badge(badge)}
            </label>
        </li>
        %endfor
    </ul>
    %else:
    <p>${_(u"No Badges")}</p>
    %endif

    ${components.savebox(h.base_url("/instance/%s" % c.page_instance.key))}
</form>

</%block>

Fix title and breadcrumbs in instance badge template
Fix title and breadcrumbs in instance badge template
