mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
26 lines
1.2 KiB
HTML
26 lines
1.2 KiB
HTML
<%+cbi/valueheader%>
|
||
<%- if self.password then -%>
|
||
<input type="password" style="position:absolute; left:-4000px"<%=
|
||
attr("name", "password." .. cbid)
|
||
%> />
|
||
<%- end -%>
|
||
<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) ..
|
||
ifattr(self.password, "autocomplete", "new-password") ..
|
||
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 })
|
||
%> />
|
||
<%- if self.password then -%>
|
||
<div class="cbi-button cbi-button-neutral" title="<%:Reveal/hide password%>" onclick="var e = this.previousElementSibling; e.type = (e.type === 'password') ? 'text' : 'password'">∗</div>
|
||
<% end %>
|
||
<%+cbi/valuefooter%>
|