Fix whitespace issues in CBI template
[project/luci.git] / libs / cbi / luasrc / view / cbi / value.htm
index 777d480..d85fa81 100644 (file)
@@ -13,7 +13,7 @@ $Id$
 
 -%>
 <%+cbi/valueheader%>
-       <input type="text" onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self:cfgvalue(section)) .. ifattr(self.size, "size") .. ifattr(self.maxlength, "maxlength") %> />
+       <input type="<%=self.password and 'password" class="cbi-input-key' or "text"%>" onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self:cfgvalue(section)) .. ifattr(self.size, "size")%> />
        <% if #self.keylist > 0 then -%>
        <script type="text/javascript">
                cbi_combobox_init('<%=cbid%>', {
@@ -26,7 +26,12 @@ $Id$
                -%>
                }, '<%- if not self.rmempty and not self.optional then -%>
                        <%-:cbi_select-%>
-               <%- end -%>', '<%:cbi_manual%>');
+               <%- end -%>', '
+               <%- if self.combobox_manual then -%>
+                       <%-=self.combobox_manual-%>
+               <%- else -%>
+                       <%-:cbi_manual-%>
+               <%- end -%>');
        </script>
        <% end -%>
 <%+cbi/valuefooter%>