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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt (-5 lines)
Lines 137-147 Link Here
137
     </div> <!-- /.row -->
137
     </div> <!-- /.row -->
138
[% MACRO jsinclude BLOCK %]
138
[% MACRO jsinclude BLOCK %]
139
    [% Asset.js("js/admin-menu.js") | $raw %]
139
    [% Asset.js("js/admin-menu.js") | $raw %]
140
    <script>
141
        var MSG_AUDIO_EMPTY_SOUND = _("Please select or enter a sound.");
142
        var MSG_AUDIO_CONFIRM_DELETE = _("Are you sure you want to delete the selected audio alerts?");
143
        var MSG_AUDIO_CHECK_CHECKBOXES = _("Check the box next to the alert you want to delete.")
144
    </script>
145
    [% Asset.js("js/audio_alerts.js") | $raw %]
140
    [% Asset.js("js/audio_alerts.js") | $raw %]
146
[% END %]
141
[% END %]
147
[% INCLUDE 'intranet-bottom.inc' %]
142
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/audio_alerts.js (-4 / +5 lines)
Lines 1-3 Link Here
1
/* global __ */
2
1
$( document ).ready(function() {
3
$( document ).ready(function() {
2
    var checkboxes = $("#delete-alert-form input[type='checkbox']");
4
    var checkboxes = $("#delete-alert-form input[type='checkbox']");
3
    var checkedcheckboxes = 0;
5
    var checkedcheckboxes = 0;
Lines 37-43 $( document ).ready(function() { Link Here
37
        if( soundfield.val() !== '' ){
39
        if( soundfield.val() !== '' ){
38
            playSound( soundfield.val() );
40
            playSound( soundfield.val() );
39
        } else {
41
        } else {
40
            alert( MSG_AUDIO_EMPTY_SOUND );
42
            alert( __("Please select or enter a sound.") );
41
        }
43
        }
42
    });
44
    });
43
45
Lines 59-67 $( document ).ready(function() { Link Here
59
61
60
    $('#delete-alert-form').on('submit', function() {
62
    $('#delete-alert-form').on('submit', function() {
61
        if( checkedcheckboxes == 1 ){
63
        if( checkedcheckboxes == 1 ){
62
            return confirm( MSG_AUDIO_CONFIRM_DELETE );
64
            return confirm( __("Are you sure you want to delete the selected audio alerts?") );
63
        } else {
65
        } else {
64
            alert( MSG_AUDIO_CHECK_CHECKBOXES );
66
            alert( __("Check the box next to the alert you want to delete.") );
65
            return false;
67
            return false;
66
        }
68
        }
67
    });
69
    });
68
- 

Return to bug 26225