From 699a0d347c243db31cc33a4d880ad3aba85c547b Mon Sep 17 00:00:00 2001
From: Nic Wolfe <nic@wolfeden.ca>
Date: Tue, 6 Dec 2011 21:15:02 -0700
Subject: [PATCH] Hide the API key config when the api is disabled

---
 data/interfaces/default/config_general.tmpl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/data/interfaces/default/config_general.tmpl b/data/interfaces/default/config_general.tmpl
index edbb92c98..a958356a4 100644
--- a/data/interfaces/default/config_general.tmpl
+++ b/data/interfaces/default/config_general.tmpl
@@ -130,18 +130,18 @@
                     <div class="component-group-desc">
                         <h3>API</h3>
                         <p>Allow 3rd party programs to interact with Sick-Beard.</p>
-                        <p>You may use the api-builder tool to test or help you develop at <a href="$sbRoot/api/builder">API-Builder</a>.</p>
                     </div>
 
                     <fieldset class="component-group-list">
                         <div class="field-pair">
-                            <input type="checkbox" name="use_api" id="use_api" #if $sickbeard.USE_API then "checked=\"checked\"" else ""#/>
+                            <input type="checkbox" name="use_api" class="enabler" id="use_api" #if $sickbeard.USE_API then "checked=\"checked\"" else ""#/>
                             <label class="clearfix" for="use_api">
                                 <span class="component-title">Enable API</span>
                                 <span class="component-desc">Allow the use of the Sick-Beard API.</span>
                             </label>
                         </div>
 
+                        <div id="content_use_api">
                         <div class="field-pair">
                             <label class="nocheck clearfix" for="api_key">
                                 <span class="component-title">API Key</span>
@@ -150,9 +150,10 @@
                             </label>
                             <label class="nocheck clearfix">
                                 <span class="component-title">&nbsp;</span>
-                                <span class="component-desc">This key will give 3rd party programs limited access to Sick-Beard.</span>
+                                <span class="component-desc">Used to give 3rd party programs limited access to Sick-Beard.</span>
                             </label>
                         </div>
+                        </div>
 
                         <input type="submit" class="config_submitter" value="Save Changes" />
                     </fieldset>
-- 
GitLab