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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-1 / +12 lines)
Lines 28-38 function clear_edit(){ Link Here
28
28
29
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this rule? This cannot be undone.");
29
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this rule? This cannot be undone.");
30
30
31
31
$(document).ready(function() {
32
$(document).ready(function() {
32
    $(".delete").on("click",function(){
33
    $(".delete").on("click",function(){
33
        return confirmDelete(MSG_CONFIRM_DELETE);
34
        return confirmDelete(MSG_CONFIRM_DELETE);
34
    });
35
    });
35
36
37
    $("#clone_rules").on("click",function(){
38
        var library_dropdown = document.getElementById("branch");
39
        var selected_library = library_dropdown.options[library_dropdown.selectedIndex].value;
40
        if (selected_library === "*") {
41
            var to_library = $("#tobranch option:selected").text();
42
            var MSG_CONFIRM_CLONE = _("Are you sure you want to clone this standard rule to " + to_library + " library? This will override the existing rules in " + to_library + " library.");
43
            return confirmClone(MSG_CONFIRM_CLONE);
44
        }
45
    });
46
36
        $('#cap_fine_to_replacement_price').on('change', function(){
47
        $('#cap_fine_to_replacement_price').on('change', function(){
37
            $('#overduefinescap').prop('disabled', $(this).is(':checked') );
48
            $('#overduefinescap').prop('disabled', $(this).is(':checked') );
38
        });
49
        });
Lines 156-162 $(document).ready(function() { Link Here
156
                <select name="tobranch" id="tobranch">
167
                <select name="tobranch" id="tobranch">
157
                    [% PROCESS options_for_libraries libraries => Branches.all( unfiltered => 1 ) %]
168
                    [% PROCESS options_for_libraries libraries => Branches.all( unfiltered => 1 ) %]
158
                </select>
169
                </select>
159
                <input type="submit" value="Clone" />
170
                <input type="submit" id="clone_rules" value="Clone" />
160
            </form>
171
            </form>
161
        [% END %]
172
        [% END %]
162
173
(-)a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js (-1 / +4 lines)
Lines 135-140 function confirmDelete(message) { Link Here
135
    return (confirm(message) ? true : false);
135
    return (confirm(message) ? true : false);
136
}
136
}
137
137
138
function confirmClone(message) {
139
    return (confirm(message) ? true : false);
140
}
141
138
function playSound( sound ) {
142
function playSound( sound ) {
139
    if ( ! ( sound.indexOf('http://') === 0 || sound.indexOf('https://') === 0  ) ) {
143
    if ( ! ( sound.indexOf('http://') === 0 || sound.indexOf('https://') === 0  ) ) {
140
        sound = AUDIO_ALERT_PATH + sound;
144
        sound = AUDIO_ALERT_PATH + sound;
141
- 

Return to bug 19029