From 566a6be137c012ad5319e4d786d9c3a3e26dcdac Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 21 Oct 2010 11:20:19 +0200 Subject: [PATCH] Hide advanced settings. --- .../resources/templates/include/createSone.html | 40 ++++++++++++++++------ 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/src/main/resources/templates/include/createSone.html b/src/main/resources/templates/include/createSone.html index c98c2ee..9666b27 100644 --- a/src/main/resources/templates/include/createSone.html +++ b/src/main/resources/templates/include/createSone.html @@ -7,6 +7,24 @@ /* hide all the labels. */ $("#sone #create-sone label").hide(); + + /* now hide the “advanced” section. */ + advancedSection = $("#sone #create-sone .advanced"); + advancedSection.hide(); + + /* show a checkbox instead. */ + checkboxSection = $("
"); + checkbox = $("").click(function() { + if (this.checked) { + advancedSection.show(); + $("#sone #create-sone button[name=create-random]").hide(); + } else { + advancedSection.hide(); + $("#sone #create-sone button[name=create-random]").show(); + } + }) + checkboxSection.append(checkbox).append("Show advanced settings"); + advancedSection.before(checkboxSection); }); @@ -23,15 +41,17 @@
- class="error"<%/if>> - - - - class="error"<%/if>> - - - -
- +
+ class="error"<%/if>> + + +
+ class="error"<%/if>> + + +
+
+ +
-- 2.7.4