From 14587d42489b96844867c262fdba7a04347d1101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Mon, 5 Oct 2020 20:36:15 +0200 Subject: [PATCH] Watch the chnage event to update the settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: John Molakvoæ Signed-off-by: Bjoern Schiessle --- apps/dav/js/settings-admin-carddav.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dav/js/settings-admin-carddav.js b/apps/dav/js/settings-admin-carddav.js index db0ea65f03..daaecae8e5 100644 --- a/apps/dav/js/settings-admin-carddav.js +++ b/apps/dav/js/settings-admin-carddav.js @@ -21,6 +21,6 @@ */ "use strict"; -document.getElementById('carddavExposeSystemAddressBook').onclick = function() { - OCP.AppConfig.setValue('dav', 'exposeSystemAddressBook', this.checked ? 'yes' : 'no'); -}; +document.getElementById('carddavExposeSystemAddressBook').addEventListener('change', function(e) { + OCP.AppConfig.setValue('dav', 'exposeSystemAddressBook', e.target.checked ? 'yes' : 'no'); +});