summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinevalue.htm
blob: 51c97f5c975bb91172052a167d11e536f3db8a6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<div style="display: inline-block;">
	<!-- <%- if self.title then -%>
	<label class="cbi-value-title"<%= attr("for", cbid) %>>
		<%- if self.titleref then -%><a title="<%=self.titledesc or translate('Go to relevant configuration page')%>" class="cbi-title-ref" href="<%=self.titleref%>"><%- end -%>
			<%-=self.title-%>
		<%- if self.titleref then -%></a><%- end -%>
		</label>
	<%- end -%> -->
	<%- if self.password then -%>
		<input type="password" style="position:absolute; left:-100000px" aria-hidden="true"<%=
			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 %>
</div>