view kallithea/templates/admin/repo_groups/repo_group_edit_settings.html @ 8947:abc29122c7f2 stable

repo group: introduce editing of owner The repo group owner concept was only partially implemented. Owners were shown in the repo group listing, but couldn't be changed. Users owning repo groups couldn't be deleted, with no other solution than deleting owned repo groups. This also fixes the existing broken update_repo_group API, which tried to use unimplemented functionality.
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 10 Dec 2022 18:18:05 +0100
parents 19d93bd709bf
children
line wrap: on
line source

## -*- 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="owner">${_('Owner')}:</label>
            <div>
               ${h.text('owner',class_='form-control', placeholder=_('Type name of user'))}
            </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>
    'use strict';
    $(document).ready(function(){
        $("#parent_group_id").select2({
            'dropdownAutoWidth': true
        });
        SimpleUserAutoComplete($('#owner'));
    });
</script>