<%inherit file="/instance/settings.html" />
<%namespace name="forms" file="/forms.html"/>
<%namespace name="components" file="/components.html"/>


<%block name="settings_content">
<form name="appearance" class="well" method="POST"
      enctype="multipart/form-data">

    ${components.flashmessages()}
    <h2>${c.settings_menu.current['label']}</h2>
    <input type="hidden" name="_method" value="PUT" />
    ${h.field_token()|n}

    ${forms.input(_("Name of the instance"), 'label', help=_("Give your instance a name."), autofocus=True)}

    <%forms:textarea label="${_('Description of the instance')}" name="description" value=""
    help="${_('This is what appears on the overview-page of your instance. Describe the participation process you have in mind. Clearly state the goals of this group and how its members can participate in reaching them.')} ${_('(Both Markdown and HTML are allowed here.)') if h.text.getconf_allow_user_html(true) else ''}">
    ${components.formatting()}
    </%forms:textarea>

    <fieldset class="logo">
        <%forms:input label="${_('Logo')}" name="logo" type="file"
                      help="${_('Select the logo you would like to have as header of your group.')}">
        </%forms:input>
        %if c.current_logo:
        <div class="current">
            <img src="${c.current_logo}" alt="${_('Current logo')}" />
            <br />
            <input type="button" name="delete_logo" value="${_('Delete current logo')}" class="fake_submit"/>
        </div>
        %endif
    </fieldset>
    %if h.config.get_bool('adhocracy.instance.allow_logo_as_background') and c.page_instance.is_authenticated:
    ${forms.checkbox(_('Use logo as background image'), 'logo_as_background')}
    %endif

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

</form>
</%block>
