diff --git a/lockdown.html b/lockdown.html
index d576c06..6ea1ddb 100644
--- a/lockdown.html
+++ b/lockdown.html
@@ -75,6 +75,9 @@
+
+
Error: Unable to retrieve options from browser storage.
+
Please enter a non-zero duration for the lockdown.
diff --git a/lockdown.js b/lockdown.js
index bb7044e..9e58b0f 100644
--- a/lockdown.js
+++ b/lockdown.js
@@ -41,6 +41,7 @@ function initializeForm() {
function onError(error) {
warn("Cannot get options: " + error);
+ $("#alertRetrieveError").dialog("open");
}
}
@@ -122,16 +123,15 @@ $("#activate").click(onActivate);
$("#cancel").button();
$("#cancel").click(onCancel);
-let alerts = ["alertNoDuration", "alertNoSets"];
-for (let alert of alerts) {
- $(`#${alert}`).dialog({
- autoOpen: false,
- modal: true,
- buttons: {
- OK: function() { $(this).dialog("close"); }
- }
- });
-}
+// Initialize alert dialogs
+$("div[id^='alert']").dialog({
+ autoOpen: false,
+ modal: true,
+ width: 500,
+ buttons: {
+ OK: function () { $(this).dialog("close"); }
+ }
+});
$("#form").show();