Add default texts to all “create Sone” input fields.
[Sone.git] / src / main / resources / templates / include / createSone.html
1 <script language="javascript">
2         $(document).ready(function() {
3                 registerInputTextareaSwap("#sone #create-sone input[name=name]", "The name of your Sone", "name");
4                 registerInputTextareaSwap("#sone #create-sone input[name=document-name]", "The document name of your Sone", "document-name");
5                 registerInputTextareaSwap("#sone #create-sone input[name=insert-uri]", "The insert URI of your Sone", "insert-uri");
6                 registerInputTextareaSwap("#sone #create-sone input[name=request-uri]", "The request URI of your Sone", "request-uri");
7
8                 /* hide all the labels. */
9                 $("#sone #create-sone label").hide();
10         });
11 </script>
12
13 <form id="create-sone" action="createSone.html" method="post">
14         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
15         <div<%if errorName> class="error"<%/if>>
16                 <label for="name"><%= Page.Login.CreateSone.Label.Name|l10n|html></label>
17                 <input type="text" name="name" value="<% name|html>"/>
18         </div>
19         <div>
20                 <label for="document-name"><%= Page.Login.CreateSone.Label.DocumentName|l10n|html></label>
21                 <input type="text" name="document-name" value="<% documentName|html>" />
22         </div>
23         <div>
24                 <button type="submit" name="create-random" value="1"><%= Page.Login.CreateSone.Button.CreateRandom|l10n|html></button>
25         </div>
26         <div<%if errorUri> class="error"<%/if>>
27                 <label for="insert-uri"><%= Page.Login.CreateSone.Label.RequestURI|l10n|html></label>
28                 <input type="text" name="insert-uri" value="<% insertUri|html>" />
29         </div>
30         <div<%if errorUri> class="error"<%/if>>
31                 <label for="insert-uri"><%= Page.Login.CreateSone.Label.InsertURI|l10n|html></label>
32                 <input type="text" name="insert-uri" value="<% requestUri|html>" />
33         </div>
34         <div>
35                 <button type="submit" name="create-from-uri" value="1"><%= Page.Login.CreateSone.Button.CreateFromURI|l10n|html></button>
36         </div>
37 </form>