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

(-)a/admin/clone-rules.pl (-3 lines)
Lines 59-66 if ($frombranch && $tobranch && $frombranch ne $tobranch) { Link Here
59
    $template->param(error => 1);
59
    $template->param(error => 1);
60
}
60
}
61
61
62
$template->param(result => 1);
63
64
65
output_html_with_http_headers $input, $cookie, $template->output;
62
output_html_with_http_headers $input, $cookie, $template->output;
66
63
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt (-43 / +10 lines)
Lines 37-85 Link Here
37
            <main>
37
            <main>
38
                [% INCLUDE 'messages.inc' %]
38
                [% INCLUDE 'messages.inc' %]
39
39
40
    <h1>Cloning circulation and fine rules
40
                <h1>Cloning circulation and fine rules
41
        [% IF frombranch == "*" %] from standard rules[% ELSIF frombranch %] from "[% Branches.GetName( frombranch ) | html %]"[% END %]
41
                    [% IF frombranch == "*" %] from standard rules[% ELSIF frombranch %] from "[% Branches.GetName( frombranch ) | html %]"[% END %]
42
        [% IF tobranch %] to "[% Branches.GetName( tobranch ) | html %]"[% END %]
42
                    [% IF tobranch %] to "[% Branches.GetName( tobranch ) | html %]"[% END %]
43
    </h1>
43
                </h1>
44
44
45
    [% IF ( result ) %]
45
                [% IF ( error ) %]
46
	[% IF ( error ) %]
46
                    <div class="dialog alert">Cloning of circulation and fine rules failed!</div>
47
        <div class="dialog alert">Cloning of circulation and fine rules failed!</div>
47
                [% ELSE %]
48
	[% ELSE %]
48
                    <div class="dialog message"><p>The rules have been cloned.</p></div>
49
	    <div class="dialog message"><p>The rules have been cloned.</p></div>
49
                [% END %]
50
	[% END %]
50
                <a href="/cgi-bin/koha/admin/smart-rules.pl">Return to circulation and fine rules</a>
51
    <a href="/cgi-bin/koha/admin/smart-rules.pl">Return to circulation and fine rules</a>
52
    [% ELSE %]
53
54
    <p class="help">Use carefully! If the destination library already has circulation and fine rules, they will be deleted without warning!</p>
55
    <form action="/cgi-bin/koha/admin/clone-rules.pl" method="post">
56
        [% UNLESS ( frombranch ) %]
57
            <fieldset>
58
                <legend>Please choose a library to clone rules from:</legend>
59
                <label for="frombranch">Source library:</label>
60
                <select name="frombranch" id="frombranch">
61
                    <option value="">Default</option>
62
                    [% PROCESS options_for_libraries libraries => Branches.all() %]
63
                </select>
64
                [% IF ( tobranch ) %]<input type="hidden" name="tobranch" value="[% tobranch | html %]" />[% END %]
65
            </fieldset>
66
        [% END %]
67
68
        [% UNLESS ( tobranch ) %]
69
            <fieldset>
70
            <legend>Please choose the library to clone the rules to:</legend>
71
            <label for="tobranch">Destination library:</label>
72
            <select name="tobranch" id="tobranch">
73
                <option value="">Default</option>
74
                [% PROCESS options_for_libraries libraries => Branches.all() %]
75
            </select>
76
            [% IF ( frombranch ) %]<input type="hidden" name="frombranch" value="[% frombranch | html %]" />[% END %]
77
            </fieldset>
78
        [% END %]
79
        <input type="submit" class="btn btn-primary" value="Submit" />
80
    </form>
81
82
    [% END %]
83
            </main>
51
            </main>
84
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
52
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
85
53
86
- 

Return to bug 36017