Move Sone creation to its own template.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 20 Oct 2010 14:01:30 +0000 (16:01 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 20 Oct 2010 14:01:30 +0000 (16:01 +0200)
src/main/resources/static/css/sone.css
src/main/resources/templates/createSone.html
src/main/resources/templates/include/createSone.html [new file with mode: 0644]
src/main/resources/templates/login.html

index 195708a..3787f27 100644 (file)
        display: inline;
 }
 
+#sone #create-sone {
+       
+}
+
 #sone #tail .import-key {
        margin-top: 1em;
        border-top: solid 1px #ccc;
index 71d7366..eb92652 100644 (file)
@@ -3,30 +3,6 @@
        <h1><%= Page.Login.CreateSone.Title|l10n|html></h1>
        <div><%= Page.Login.CreateSone.Description|l10n|html></div>
 
-       <form action="createSone.html" method="post">
-               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-               <div<%if errorName> class="error"<%/if>>
-                       <label for="name"><%= Page.Login.CreateSone.Label.Name|l10n|html></label>
-                       <input type="text" name="name" value="<% name|html>"/>
-               </div>
-               <div>
-                       <label for="document-name"><%= Page.Login.CreateSone.Label.DocumentName|l10n|html></label>
-                       <input type="text" name="document-name" value="<% documentName|html>" />
-               </div>
-               <div<%if errorUri> class="error"<%/if>>
-                       <label for="insert-uri"><%= Page.Login.CreateSone.Label.RequestURI|l10n|html></label>
-                       <input type="text" name="insert-uri" value="<% insertUri|html>" />
-               </div>
-               <div<%if errorUri> class="error"<%/if>>
-                       <label for="insert-uri"><%= Page.Login.CreateSone.Label.InsertURI|l10n|html></label>
-                       <input type="text" name="insert-uri" value="<% requestUri|html>" />
-               </div>
-               <div>
-                       <button type="submit" name="create-from-uri" value="1"><%= Page.Login.CreateSone.Button.CreateFromURI|l10n|html></button>
-               </div>
-               <div>
-                       <button type="submit" name="create-random" value="1"><%= Page.Login.CreateSone.Button.CreateRandom|l10n|html></button>
-               </div>
-       </form>
+       <%include include/createSone.html>
 
 <%include include/tail.html>
diff --git a/src/main/resources/templates/include/createSone.html b/src/main/resources/templates/include/createSone.html
new file mode 100644 (file)
index 0000000..318effe
--- /dev/null
@@ -0,0 +1,25 @@
+<form id="create-sone" action="createSone.html" method="post">
+       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+       <div<%if errorName> class="error"<%/if>>
+               <label for="name"><%= Page.Login.CreateSone.Label.Name|l10n|html></label>
+               <input type="text" name="name" value="<% name|html>"/>
+       </div>
+       <div>
+               <label for="document-name"><%= Page.Login.CreateSone.Label.DocumentName|l10n|html></label>
+               <input type="text" name="document-name" value="<% documentName|html>" />
+       </div>
+       <div>
+               <button type="submit" name="create-random" value="1"><%= Page.Login.CreateSone.Button.CreateRandom|l10n|html></button>
+       </div>
+       <div<%if errorUri> class="error"<%/if>>
+               <label for="insert-uri"><%= Page.Login.CreateSone.Label.RequestURI|l10n|html></label>
+               <input type="text" name="insert-uri" value="<% insertUri|html>" />
+       </div>
+       <div<%if errorUri> class="error"<%/if>>
+               <label for="insert-uri"><%= Page.Login.CreateSone.Label.InsertURI|l10n|html></label>
+               <input type="text" name="insert-uri" value="<% requestUri|html>" />
+       </div>
+       <div>
+               <button type="submit" name="create-from-uri" value="1"><%= Page.Login.CreateSone.Button.CreateFromURI|l10n|html></button>
+       </div>
+</form>
index 804ac83..7f300b8 100644 (file)
                        <button type="submit"><%= Page.Login.LoadSone.Button.LoadSone|l10n|html></button>
                </div>
        </form>
+
        <h1><%= Page.Login.CreateSone.Title|l10n|html></h1>
        <div><%= Page.Login.CreateSone.Description|l10n|html></div>
-       <form action="createSone.html" method="post">
-               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-               <div>
-                       <label for="name"><%= Page.Login.CreateSone.Label.Name|l10n|html></label>
-                       <input type="text" name="name" />
-               </div>
-               <div>
-                       <label for="document-name"><%= Page.Login.CreateSone.Label.DocumentName|l10n|html></label>
-                       <input type="text" name="document-name" value="<% documentName|html>" />
-               </div>
-               <div>
-                       <label for="insert-uri"><%= Page.Login.CreateSone.Label.RequestURI|l10n|html></label>
-                       <input type="text" name="insert-uri" value="" />
-               </div>
-               <div>
-                       <label for="insert-uri"><%= Page.Login.CreateSone.Label.InsertURI|l10n|html></label>
-                       <input type="text" name="insert-uri" value="" />
-               </div>
-               <div>
-                       <button type="submit" name="create-from-uri" value="1"><%= Page.Login.CreateSone.Button.CreateFromURI|l10n|html></button>
-               </div>
-               <div>
-                       <button type="submit" name="create-random" value="1"><%= Page.Login.CreateSone.Button.CreateRandom|l10n|html></button>
-               </div>
-       </form>
+       <%include include/createSone.html>
+
 <%include include/tail.html>