From c04d5c78464a1459663890c3ec9e160e1d73bd13 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sat, 22 Aug 2009 22:23:59 -0400 Subject: [PATCH] Changing to valid HTML broke the "Delete Section" button. --- plugins/settings/templates/settings.tmpl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/settings/templates/settings.tmpl b/plugins/settings/templates/settings.tmpl index 84b278a..6265dd0 100644 --- a/plugins/settings/templates/settings.tmpl +++ b/plugins/settings/templates/settings.tmpl @@ -105,7 +105,8 @@ function switchDiv(pass, type) function deleteSection(id) { - var name = select_section.section.options[id].text; + var ss = document.getElementById('ss'); + var name = ss.section.options[id].text; if (name == 'Global Server Settings') { alert('Delete Error:\n\nSorry the Global Server Settings ' + 'Section is required for pyTivo to run and cannot be deleted'); @@ -115,8 +116,8 @@ function deleteSection(id) "' Section?") if (answer) { switchDiv('set-delete', 'set-'); - select_section.section.options[id] = null; - var field = document.getElementById(name).value; + ss.section.options[id] = null; + var field = document.getElementById('opts.' + name).value; document.getElementById(field).value = 'Delete_Me'; saveNotify(); return true; @@ -255,7 +256,7 @@ function saveNotify()
-

Sections
+

Sections