summaryrefslogtreecommitdiffstats
path: root/comm/suite/mailnews/components/prefs/content/pref-receipts.js
diff options
context:
space:
mode:
Diffstat (limited to 'comm/suite/mailnews/components/prefs/content/pref-receipts.js')
-rw-r--r--comm/suite/mailnews/components/prefs/content/pref-receipts.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/comm/suite/mailnews/components/prefs/content/pref-receipts.js b/comm/suite/mailnews/components/prefs/content/pref-receipts.js
new file mode 100644
index 0000000000..7a85ac1a1f
--- /dev/null
+++ b/comm/suite/mailnews/components/prefs/content/pref-receipts.js
@@ -0,0 +1,28 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+var gNotInToCcLabel;
+var gOutsideDomainLabel;
+var gOtherCasesLabel;
+
+function Startup()
+{
+ gNotInToCcLabel = document.getElementById("notInToCcLabel");
+ gOutsideDomainLabel = document.getElementById("outsideDomainLabel");
+ gOtherCasesLabel = document.getElementById("otherCasesLabel");
+
+ var value = document.getElementById("mail.mdn.report.enabled").value;
+ EnableDisableAllowedReceipts(value);
+}
+
+function EnableDisableAllowedReceipts(aEnable)
+{
+ EnableElementById("notInToCcPref", aEnable, false);
+ EnableElementById("outsideDomainPref", aEnable, false);
+ EnableElementById("otherCasesPref", aEnable, false);
+ gNotInToCcLabel.disabled = !aEnable;
+ gOutsideDomainLabel.disabled = !aEnable;
+ gOtherCasesLabel.disabled = !aEnable;
+}