2008-09-23 00:10:51 +00:00
|
|
|
<%
|
|
|
|
local t = require("luci.tools.webadmin")
|
|
|
|
local v = self:cfgvalue(section)
|
2009-10-07 19:50:20 +00:00
|
|
|
local s = v and nixio.fs.stat(v)
|
2008-09-23 00:10:51 +00:00
|
|
|
-%>
|
|
|
|
<%+cbi/valueheader%>
|
2009-10-07 19:50:20 +00:00
|
|
|
<% if s then %>
|
2009-10-31 19:26:07 +00:00
|
|
|
<%:Uploaded File%> (<%=t.byte_format(s.size)%>)
|
2008-09-23 00:10:51 +00:00
|
|
|
<input type="hidden"<%= attr("value", v) .. attr("name", cbid) .. attr("id", cbid) %> />
|
2011-09-22 13:25:48 +00:00
|
|
|
<input class="cbi-button cbi-input-image" type="image" value="<%:Replace entry%>" name="cbi.rlf.<%=section .. "." .. self.option%>" alt="<%:Replace entry%>" title="<%:Replace entry%>" src="<%=resource%>/cbi/reload.gif" />
|
2008-09-23 00:10:51 +00:00
|
|
|
<% else %>
|
2008-10-07 15:41:15 +00:00
|
|
|
<input class="cbi-input-file" type="file"<%= attr("name", cbid) .. attr("id", cbid) %> />
|
2008-09-23 00:10:51 +00:00
|
|
|
<% end %>
|
|
|
|
<%+cbi/valuefooter%>
|