<form action="[% c.req.uri %]" method="post">
    [% USE r = FormRenderer(form) %]
    <fieldset>
        <legend>[% l('Collection details') %]</legend>
        [% form_row_text_long(r, 'name', l('Name:')) %]
        [%~ form_row_select(r, 'type_id', l('Type:'), '', collection.entity_count ? { disabled => 'disabled' } : {}) ~%]
        [% r.hidden(form.field('type_id')) IF collection.entity_count %]
        [% WRAPPER form_row %]
                [% r.label('description', l('Description:')) %]
                [% r.textarea('description', { cols => 80, rows => 5 }) %]
                [% field_errors(form, 'description') %]
        [% END %]

        [% form_row_checkbox(r, 'public', l('Allow other users to see this collection')) %]
    </fieldset>

    <div class="row no-label">
        [% IF c.action.name == "create" %]
            [% form_submit(l('Create collection')) %]
        [% ELSE %]
            [% form_submit(l('Update collection')) %]
        [% END %]
    </div>
</form>
