|
Lines 3-8
Link Here
|
| 3 |
|
3 |
|
| 4 |
KOHA.Preferences = { |
4 |
KOHA.Preferences = { |
| 5 |
Save: function ( form ) { |
5 |
Save: function ( form ) { |
|
|
6 |
if ( ! $(form).valid() ) { |
| 7 |
humanMsg.displayAlert( MSG_INVALID ); |
| 8 |
return; |
| 9 |
} |
| 10 |
|
| 6 |
modified_prefs = $( form ).find( '.modified' ); |
11 |
modified_prefs = $( form ).find( '.modified' ); |
| 7 |
// $.serialize removes empty value, we need to keep them. |
12 |
// $.serialize removes empty value, we need to keep them. |
| 8 |
// If a multiple select has all its entries unselected |
13 |
// If a multiple select has all its entries unselected |
|
Lines 181-184
$( document ).ready( function () {
Link Here
|
| 181 |
if ( alert_text.length ) alert(alert_text); |
186 |
if ( alert_text.length ) alert(alert_text); |
| 182 |
}); |
187 |
}); |
| 183 |
|
188 |
|
|
|
189 |
$(".prefs-tab form").each(function () { |
| 190 |
$(this).validate({ |
| 191 |
rules: { }, |
| 192 |
errorPlacement: function(error, element) { |
| 193 |
var placement = $(element).parent(); |
| 194 |
if (placement) { |
| 195 |
$(placement).append(error) |
| 196 |
} else { |
| 197 |
error.insertAfter(element); |
| 198 |
} |
| 199 |
} |
| 200 |
}); |
| 201 |
}); |
| 202 |
|
| 203 |
$(".preference-email").each(function() { |
| 204 |
$(this).rules("add", { |
| 205 |
email: true |
| 206 |
}); |
| 207 |
}); |
| 184 |
} ); |
208 |
} ); |
| 185 |
- |
|
|