Watch the chnage event to update the settings

Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com>

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
Björn Schießle 2020-10-05 20:36:15 +02:00 committed by Bjoern Schiessle
parent 0ee66348d1
commit 14587d4248
1 changed files with 3 additions and 3 deletions

View File

@ -21,6 +21,6 @@
*/ */
"use strict"; "use strict";
document.getElementById('carddavExposeSystemAddressBook').onclick = function() { document.getElementById('carddavExposeSystemAddressBook').addEventListener('change', function(e) {
OCP.AppConfig.setValue('dav', 'exposeSystemAddressBook', this.checked ? 'yes' : 'no'); OCP.AppConfig.setValue('dav', 'exposeSystemAddressBook', e.target.checked ? 'yes' : 'no');
}; });