config-mode.htm 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <%-
  2. local sysconfig = require 'gluon.sysconfig'
  3. local i18n = require 'luci.i18n'
  4. local template = require 'luci.template'
  5. -%>
  6. <h2><%:Welcome!%></h2>
  7. <p>
  8. <%= template.render_string(i18n.translate('gluon-config-mode:welcome'), {hostname=hostname, sysconfig=sysconfig}) %>
  9. </p>
  10. <% if not self.embedded then %>
  11. <form method="post" enctype="multipart/form-data" action="<%=REQUEST_URI%>">
  12. <div>
  13. <script type="text/javascript" src="<%=resource%>/cbi.js"></script>
  14. <input type="hidden" name="cbi.submit" value="1" />
  15. </div>
  16. <% end %>
  17. <div class="cbi-map" id="cbi-<%=self.config%>">
  18. <% if self.title and #self.title > 0 then %><h2><a id="content" name="content"><%=self.title%></a></h2><% end %>
  19. <% if self.description and #self.description > 0 then %><div class="cbi-map-descr"><%=self.description%></div><% end %>
  20. <% self:render_children() %>
  21. <br />
  22. </div>
  23. <%- if self.message then %>
  24. <div><%=self.message%></div>
  25. <%- end %>
  26. <%- if self.errmessage then %>
  27. <div class="error"><%=self.errmessage%></div>
  28. <%- end %>
  29. <% if not self.embedded then %>
  30. <div class="cbi-page-actions">
  31. <%-
  32. if type(self.hidden) == "table" then
  33. for k, v in pairs(self.hidden) do
  34. -%>
  35. <input type="hidden" id="<%=k%>" name="<%=k%>" value="<%=pcdata(v)%>" />
  36. <%-
  37. end
  38. end
  39. %>
  40. <input class="cbi-button cbi-button-save" type="submit" value="<%:Save & restart%>" />
  41. <script type="text/javascript">cbi_d_update();</script>
  42. </div>
  43. </form>
  44. <% end %>