## -*- coding: utf-8 -*-
${h.form(url('update_repos_group',group_name=c.repo_group.group_name))}
<div class="form">
        <div class="form-group">
            <label class="control-label" for="group_name">${_('Group name')}:</label>
            <div>
                ${h.text('group_name',class_='form-control')}
            </div>
        </div>

        <div class="form-group">
            <label class="control-label" for="group_description">${_('Description')}:</label>
            <div>
                ${h.textarea('group_description',cols=23,rows=5,class_='form-control')}
            </div>
        </div>

        <div class="form-group">
            <label class="control-label" for="parent_group_id">${_('Group parent')}:</label>
            <div>
                ${h.select('parent_group_id','',c.repo_groups,class_='form-control')}
            </div>
        </div>

        <div class="form-group">
            <div class="buttons">
                ${h.submit('save',_('Save'),class_="btn btn-default")}
                ${h.reset('reset',_('Reset'),class_="btn btn-default")}
            </div>
        </div>
</div>
${h.end_form()}

${h.form(url('delete_repo_group', group_name=c.repo_group.group_name))}
<div class="form">
        <div class="form-group">
            <div class="buttons">
                ${h.submit('remove_%s' % c.repo_group.group_name,_('Remove this group'),class_="btn btn-danger",onclick="return confirm('"+_('Confirm to delete this group')+"');")}
            </div>
        </div>
</div>
${h.end_form()}

<script>
    $(document).ready(function(){
        $("#parent_group_id").select2({
            'dropdownAutoWidth': true
        });
    });
</script>
