Bug 30175: Toggle digest boxes when loading messaging preferences

To test:
1 - Define default messaging preferences for a patron category, checking a transport and the digest only boxes
2 - Create a new patron of a different category
3 - Change the category to the one set above
4 - Note that checkboxes are checked, but digest boxes are disabled
5 - Save patron - the digest boxes are not saved
6 - Apply patch
7 - Repeat 2&3
8 - Note checkboxes for digest are checked and enabled
9 - Save patron and confirm options are saved

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Nick Clemens 2022-02-24 12:12:27 +00:00 committed by Fridolin Somers
parent 9abd94b251
commit 4903d67f09

View file

@ -30,8 +30,10 @@ $(document).ready(function(){
$.each(transports, function(j, transport) {
if (item['transports_' + transport] == 1) {
$('#' + transport + attrid).prop('checked', true);
toggle_digest(attrid);
} else {
$('#' + transport + attrid).prop('checked', false);
toggle_digest(attrid);
}
});
if (item.digest && item.digest != ' ') {