diff --git a/mozilla/calendar/base/content/calendar-recurrence-dialog.js b/mozilla/calendar/base/content/calendar-recurrence-dialog.js
index 4adf196dea6..261685da3ed 100644
--- a/mozilla/calendar/base/content/calendar-recurrence-dialog.js
+++ b/mozilla/calendar/base/content/calendar-recurrence-dialog.js
@@ -48,6 +48,8 @@ function onLoad()
updateDeck();
+ updateDuration();
+
opener.setCursor("auto");
self.focus();
@@ -203,3 +205,23 @@ function updateDeck()
document.getElementById("period-deck").selectedIndex = Number(getElementValue("period-list"));
}
+function updateDuration()
+{
+ var durationSelection = document.getElementById("recurrence-duration").selectedItem.value;
+ if (durationSelection == "forever") {
+ }
+
+ if (durationSelection == "ntimes") {
+ setElementValue("repeat-ntimes-count", false, "disabled");
+ setElementValue("repeat-ntimes-units", false, "disabled");
+ } else {
+ setElementValue("repeat-ntimes-count", "true", "disabled");
+ setElementValue("repeat-ntimes-units", "true", "disabled");
+ }
+
+ if (durationSelection == "until") {
+ setElementValue("repeat-until-date", false, "disabled");
+ } else {
+ setElementValue("repeat-until-date", "true", "disabled");
+ }
+}
diff --git a/mozilla/calendar/base/content/calendar-recurrence-dialog.xul b/mozilla/calendar/base/content/calendar-recurrence-dialog.xul
index 4bd2725a87c..d85f2b0621e 100644
--- a/mozilla/calendar/base/content/calendar-recurrence-dialog.xul
+++ b/mozilla/calendar/base/content/calendar-recurrence-dialog.xul
@@ -135,7 +135,7 @@
-
+
@@ -152,7 +152,7 @@
-
+