upload.htm 656 B

1234567891011121314
  1. <%
  2. local t = require("luci.tools.webadmin")
  3. local v = self:cfgvalue(section)
  4. local s = v and nixio.fs.stat(v)
  5. -%>
  6. <%+cbi/valueheader%>
  7. <% if s then %>
  8. <%:Uploaded File%> (<%=t.byte_format(s.size)%>)
  9. <input type="hidden"<%= attr("value", v) .. attr("name", cbid) .. attr("id", cbid) %> />
  10. <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" />
  11. <% else %>
  12. <input class="cbi-input-file" type="file"<%= attr("name", cbid) .. attr("id", cbid) %> />
  13. <% end %>
  14. <%+cbi/valuefooter%>