diff --git a/pontoon/base/templates/widgets/toggle.html b/pontoon/base/templates/widgets/toggle.html index 210c3e48f..e8987daaa 100644 --- a/pontoon/base/templates/widgets/toggle.html +++ b/pontoon/base/templates/widgets/toggle.html @@ -1,7 +1,7 @@ {% macro button(field) %} {% for choice in field.field.choices %} - + {% endfor %} {% endmacro %} diff --git a/pontoon/contributors/static/js/settings.js b/pontoon/contributors/static/js/settings.js index 1e1be8994..5907197e2 100644 --- a/pontoon/contributors/static/js/settings.js +++ b/pontoon/contributors/static/js/settings.js @@ -15,7 +15,7 @@ $(function () { } const attribute = self.data('attribute'); - const value = self.text(); + const value = self.val(); $.ajax({ url: '/api/v1/user/' + $('#profile input[name="username"]').val() + '/', @@ -63,7 +63,7 @@ $(function () { self.toggleClass('enabled'); // If notification type disabled, uncheck email checkbox - if (!self.is('.enabled')) { + if (self.parents('.notifications').length && !self.is('.enabled')) { const emailChecbox = self.next('.check-box'); if (emailChecbox.length) { emailChecbox.removeClass('enabled');