View | Details | Raw Unified | Return to bug 15707
Collapse All | Expand All

(-)a/admin/library_groups.pl (-10 / +15 lines)
Lines 48-63 if ( $action eq 'add' ) { Link Here
48
    my $description = $cgi->param('description') || undef;
48
    my $description = $cgi->param('description') || undef;
49
    my $branchcode  = $cgi->param('branchcode')  || undef;
49
    my $branchcode  = $cgi->param('branchcode')  || undef;
50
50
51
    my $group = Koha::Library::Group->new(
51
    if ( Koha::Library::Groups->search( { title => $title } )->count() ) {
52
        {
52
        $template->param( error_duplicate_title => $title );
53
            parent_id   => $parent_id,
53
    }
54
            title       => $title,
54
    else {
55
            description => $description,
55
        my $group = Koha::Library::Group->new(
56
            branchcode  => $branchcode,
56
            {
57
        }
57
                parent_id   => $parent_id,
58
    )->store();
58
                title       => $title,
59
59
                description => $description,
60
    $template->param( added => $group );
60
                branchcode  => $branchcode,
61
            }
62
        )->store();
63
64
        $template->param( added => $group );
65
    }
61
}
66
}
62
elsif ( $action eq 'edit' ) {
67
elsif ( $action eq 'edit' ) {
63
    my $id          = $cgi->param('id')          || undef;
68
    my $id          = $cgi->param('id')          || undef;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt (-1 / +4 lines)
Lines 108-113 Link Here
108
            [% deleted.library | $KohaSpan class = 'name' %] has been removed from group.
108
            [% deleted.library | $KohaSpan class = 'name' %] has been removed from group.
109
        [% END %]
109
        [% END %]
110
    </div>
110
    </div>
111
[% ELSIF error_duplicate_title %]
112
    <div class="dialog alert error-duplicate-group-title">
113
            A group with the title [% error_duplicate_title | $KohaSpan class = 'name' %] already exists.
114
    </div>
111
[% END %]
115
[% END %]
112
116
113
<div id="doc3" class="yui-t2">
117
<div id="doc3" class="yui-t2">
114
- 

Return to bug 15707