value.htm 1009 B

123456789101112131415161718
  1. <%+cbi/valueheader%>
  2. <input data-update="change"<%=
  3. attr("id", cbid) ..
  4. attr("name", cbid) ..
  5. attr("type", self.password and "password" or "text") ..
  6. attr("class", self.password and "cbi-input-password" or "cbi-input-text") ..
  7. attr("value", self:cfgvalue(section) or self.default) ..
  8. ifattr(self.size, "size") ..
  9. ifattr(self.placeholder, "placeholder") ..
  10. ifattr(self.readonly, "readonly") ..
  11. ifattr(self.maxlength, "maxlength") ..
  12. ifattr(self.datatype, "data-type", self.datatype) ..
  13. ifattr(self.datatype, "data-optional", self.optional or self.rmempty) ..
  14. ifattr(self.combobox_manual, "data-manual", self.combobox_manual) ..
  15. ifattr(#self.keylist > 0, "data-choices", { self.keylist, self.vallist })
  16. %> />
  17. <% if self.password then %><img src="<%=resource%>/cbi/reload.gif" style="vertical-align:middle" title="<%:Reveal/hide password%>" onclick="var e = document.getElementById('<%=cbid%>'); e.type = (e.type=='password') ? 'text' : 'password';" /><% end %>
  18. <%+cbi/valuefooter%>