2 <%- if self.password then -%>
3 <input type="password" style="position:absolute; left:-1000px" aria-hidden="true"<%=
4 attr("name", "password." .. cbid)
7 <input data-update="change"<%=
10 attr("type", self.password and "password" or "text") ..
11 attr("class", self.password and "cbi-input-password" or "cbi-input-text") ..
12 attr("value", self:cfgvalue(section) or self.default) ..
13 ifattr(self.password, "autocomplete", "new-password") ..
14 ifattr(self.size, "size") ..
15 ifattr(self.placeholder, "placeholder") ..
16 ifattr(self.readonly, "readonly") ..
17 ifattr(self.maxlength, "maxlength") ..
18 ifattr(self.datatype, "data-type", self.datatype) ..
19 ifattr(self.datatype, "data-optional", self.optional or self.rmempty) ..
20 ifattr(self.combobox_manual, "data-manual", self.combobox_manual) ..
21 ifattr(#self.keylist > 0, "data-choices", { self.keylist, self.vallist })
23 <%- if self.password then -%>
24 <div class="cbi-button cbi-button-neutral" title="<%:Reveal/hide password%>" onclick="var e = this.previousElementSibling; e.type = (e.type === 'password') ? 'text' : 'password'">∗</div>