Lines 24-30
KOHA.Preferences = {
Link Here
|
24 |
data: data, |
24 |
data: data, |
25 |
url: '/cgi-bin/koha/svc/config/systempreferences/', |
25 |
url: '/cgi-bin/koha/svc/config/systempreferences/', |
26 |
success: function ( data ) { KOHA.Preferences.Success( form ) }, |
26 |
success: function ( data ) { KOHA.Preferences.Success( form ) }, |
27 |
complete: function () { KOHA.AJAX.MarkDone( $( form ).find( '.save-all' ) ) } |
27 |
complete: function () { KOHA.AJAX.MarkDone( $( form ).find( '.save-all' ) ) }, |
|
|
28 |
error: function( data ) { KOHA.Preferences.Error( data ) } |
28 |
} ); |
29 |
} ); |
29 |
}, |
30 |
}, |
30 |
Success: function ( form ) { |
31 |
Success: function ( form ) { |
Lines 40-45
KOHA.Preferences = {
Link Here
|
40 |
.find( '.modified-warning' ).remove().end() |
41 |
.find( '.modified-warning' ).remove().end() |
41 |
.find( '.modified' ).removeClass('modified'); |
42 |
.find( '.modified' ).removeClass('modified'); |
42 |
KOHA.Preferences.Modified = false; |
43 |
KOHA.Preferences.Modified = false; |
|
|
44 |
}, |
45 |
Error: function ( form ) { |
46 |
msg = "<strong>"+ MSG_DATA_NOT_SAVED + "</strong>\n"; |
47 |
modified_prefs.each(function(){ |
48 |
var modified_pref = $(this).attr("id"); |
49 |
modified_pref = modified_pref.replace("pref_",""); |
50 |
if (modified_pref in form.sysprefs) { |
51 |
if (form.sysprefs[modified_pref].error === 'Koha::Exceptions::Config::InvalidSyntax') { |
52 |
msg += "<strong>"+ MSG_INVALID_SYNTAX.format(modified_pref) + "</strong>\n"; |
53 |
} else { |
54 |
msg += "<strong>"+ form.type + "</strong>\n"; |
55 |
} |
56 |
} else { |
57 |
msg += "<strong>"+ MSG_SAVED_PREFERENCE.format(modified_pref) + "</strong>\n"; |
58 |
} |
59 |
}); |
60 |
humanMsg.displayAlert(msg); |
61 |
|
62 |
KOHA.Preferences.Modified = true; |
43 |
} |
63 |
} |
44 |
}; |
64 |
}; |
45 |
|
65 |
|