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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt (+1 lines)
Lines 202-207 Link Here
202
        var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
202
        var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
203
        var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
203
        var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
204
        var MSG_LOADING = _( "Loading..." );
204
        var MSG_LOADING = _( "Loading..." );
205
        var MSG_INVALID = _( "Error: presence of invalid data prevent saving. Please make the corrections and try again." );
205
    </script>
206
    </script>
206
    [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
207
    [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
207
    [% Asset.js("js/ajax.js") | $raw %]
208
    [% Asset.js("js/ajax.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js (-1 / +25 lines)
Lines 2-7 Link Here
2
2
3
KOHA.Preferences = {
3
KOHA.Preferences = {
4
    Save: function ( form ) {
4
    Save: function ( form ) {
5
        if ( ! $(form).valid() ) {
6
            humanMsg.displayAlert( MSG_INVALID );
7
            return;
8
        }
9
5
        modified_prefs = $( form ).find( '.modified' );
10
        modified_prefs = $( form ).find( '.modified' );
6
        // $.serialize removes empty value, we need to keep them.
11
        // $.serialize removes empty value, we need to keep them.
7
        // If a multiple select has all its entries unselected
12
        // If a multiple select has all its entries unselected
Lines 143-146 $( document ).ready( function () { Link Here
143
    if ( search_jumped ) {
148
    if ( search_jumped ) {
144
        document.location.hash = "jumped";
149
        document.location.hash = "jumped";
145
    }
150
    }
151
152
    $(".prefs-tab form").each(function () {
153
        $(this).validate({
154
            rules: { },
155
            errorPlacement: function(error, element) {
156
                var placement = $(element).parent();
157
                if (placement) {
158
                    $(placement).append(error)
159
                } else {
160
                    error.insertAfter(element);
161
                }
162
            }
163
        });
164
    });
165
166
    $(".preference-email").each(function() {
167
        $(this).rules("add", {
168
            email: true
169
        });
170
    });
146
} );
171
} );
147
- 

Return to bug 8000