+<script language="javascript">
+ $(document).ready(function() {
+ registerInputTextareaSwap("#sone #create-sone input[name=name]", "WebInterface.DefaultText.CreateSoneName", "name", false);
+ registerInputTextareaSwap("#sone #create-sone input[name=document-name]", "WebInterface.DefaultText.CreateSoneDocumentName", "document-name", false);
+ registerInputTextareaSwap("#sone #create-sone input[name=insert-uri]", "WebInterface.DefaultText.CreateSoneInsertURI", "insert-uri", true);
+ registerInputTextareaSwap("#sone #create-sone input[name=request-uri]", "WebInterface.DefaultText.CreateSoneRequestURI", "request-uri", true);
+
+ /* 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 = $("<div></div>");
+ checkbox = $("<input type=\"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);
+ });
+</script>
+