* luci/libs: improved cbi templates
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 14 Aug 2008 01:31:17 +0000 (01:31 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 14 Aug 2008 01:31:17 +0000 (01:31 +0000)
* luci/modules: fix layout of sshkeys page in admin-full

libs/cbi/luasrc/view/cbi/nsection.htm
libs/cbi/luasrc/view/cbi/tblsection.htm
modules/admin-full/luasrc/view/admin_system/sshkeys.htm

index 27db4bfbfbb5bd4d1e61c11ed82cbfcc7125fada..156137eeba8addc2f7bb431c6b13a76aa4163942 100644 (file)
@@ -18,7 +18,9 @@ $Id$
                <% if self.title and #self.title > 0 then -%>
                        <legend><%=self.title%></legend>
                <%- end %>
-               <div class="cbi-section-descr"><%=self.description%></div>
+               <% if self.description and #self.description > 0 then -%>
+                       <div class="cbi-section-descr"><%=self.description%></div>
+               <%- end %>
                <% if self.addremove then -%>
                        <div class="cbi-section-remove right">
                                <input type="submit" name="cbi.rns.<%=self.config%>.<%=section%>" value="<%:cbi_del%>" />
index d4effef4938c64946ebedd22b233c8a58fee68dd..7bb31caa1debdea2a5c3d62c24fb09116b694883 100644 (file)
@@ -21,8 +21,8 @@ end
 -%>
 
 <!-- tblsection -->
-<div class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
-       <h2><%=self.title%></h2>
+<fieldset class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
+       <legend><%=self.title%></legend>
        <div class="cbi-section-descr"><%=self.description%></div>
        <div class="cbi-section-node">
                <%- local count = 0 -%>
@@ -104,5 +104,5 @@ end
                        </div>
                        <%- end -%>
        </div>
-</div>
+</fieldset>
 <!-- /tblsection -->
index 9a08af9e3b2d69a9b863e6bbe3752ab68d6dd899..7b636090cd5490a593565efdac9e8d473cebd1de 100644 (file)
@@ -12,28 +12,28 @@ You may obtain a copy of the License at
 $Id$
 
 -%>
-<%+header%>
-<h1><%:system%></h1>
-<h2><%:a_s_sshkeys%></h2>
-
-<br />
-
-<div><%:a_s_sshkeys1%></div>
 
-<br />
+<%+header%>
 
 <form method="post" action="<%=controller%>/admin/system/sshkeys">
-       <div class="cbi-section-node" style="width: 100%">
-               <div class="cbi-value">
-                       <div class="cbi-value-field">
-                               <textarea style="width: 100%" rows="10" name="data"><%=cnt%></textarea>
-                       </div>
+       <div class="cbi-map">
+               <h1><%:a_s_sshkeys%></h1>
+               <div class="cbi-map-descr">
+                       <%:a_s_sshkeys1%>
                </div>
+               <fieldset class="cbi-section">
+                       <legend><%:a_s_sshkeys%></legend>
+                       <textarea style="width: 100%" rows="10" name="data" wrap="off"><%=cnt%></textarea>
+                       <% if msg then -%>
+                               <div class="cbi-error"><%:error%>: <%=msg%></div>
+                       <% end %>
+               </fieldset>
        </div>
+
        <div>
-               <input type="submit" value="<%:save%>" />
-               <input type="reset" value="<%:reset%>" />
+               <input type="submit" value="<%:save%>" class="cbi-button cbi-button-save" />
+               <input type="reset" value="<%:reset%>" class="cbi-button cbi-button-reset" />
        </div>
-       <% if msg then %><br /><div class="error"><%:error%>: <%=msg%></div><% end %>
 </form>
-<%+footer%>
\ No newline at end of file
+
+<%+footer%>