2018-01-23 14:36:03 +00:00
|
|
|
|
<%+cbi/valueheader%>
|
2018-07-31 15:18:00 +00:00
|
|
|
|
<%- if self.password then -%>
|
2019-06-14 17:49:12 +00:00
|
|
|
|
<input type="password" style="position:absolute; left:-2000px" aria-hidden="true" tabindex="-1"<%=
|
2018-07-31 15:18:00 +00:00
|
|
|
|
attr("name", "password." .. cbid)
|
|
|
|
|
%> />
|
|
|
|
|
<%- end -%>
|
2018-01-23 14:36:03 +00:00
|
|
|
|
<input data-update="change"<%=
|
|
|
|
|
attr("id", cbid) ..
|
|
|
|
|
attr("name", cbid) ..
|
|
|
|
|
attr("type", self.password and "password" or "text") ..
|
|
|
|
|
attr("class", self.password and "cbi-input-password" or "cbi-input-text") ..
|
|
|
|
|
attr("value", self:cfgvalue(section) or self.default) ..
|
2018-07-31 15:18:00 +00:00
|
|
|
|
ifattr(self.password, "autocomplete", "new-password") ..
|
2018-01-23 14:36:03 +00:00
|
|
|
|
ifattr(self.size, "size") ..
|
|
|
|
|
ifattr(self.placeholder, "placeholder") ..
|
|
|
|
|
ifattr(self.readonly, "readonly") ..
|
|
|
|
|
ifattr(self.maxlength, "maxlength") ..
|
|
|
|
|
ifattr(self.datatype, "data-type", self.datatype) ..
|
|
|
|
|
ifattr(self.datatype, "data-optional", self.optional or self.rmempty) ..
|
|
|
|
|
ifattr(self.combobox_manual, "data-manual", self.combobox_manual) ..
|
|
|
|
|
ifattr(#self.keylist > 0, "data-choices", { self.keylist, self.vallist })
|
|
|
|
|
%> />
|
2018-07-31 15:18:00 +00:00
|
|
|
|
<%- if self.password then -%>
|
2019-05-28 19:51:29 +00:00
|
|
|
|
<button class="cbi-button cbi-button-neutral" title="<%:Reveal/hide password%>" aria-label="<%:Reveal/hide password%>" onclick="var e = this.previousElementSibling; e.type = (e.type === 'password') ? 'text' : 'password'; event.preventDefault()">∗</button>
|
2018-07-31 15:18:00 +00:00
|
|
|
|
<% end %>
|
2018-01-23 14:36:03 +00:00
|
|
|
|
<%+cbi/valuefooter%>
|