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