1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <%-
- local gluon_luci = require 'gluon.luci'
- local sysconfig = require 'gluon.sysconfig'
- local i18n = require 'luci.i18n'
- local template = require 'luci.template'
- -%>
- <h2><%:Welcome!%></h2>
- <p>
- <%= template.render_string(i18n.translate('gluon-config-mode:welcome'), {
- hostname = hostname,
- sysconfig = sysconfig,
- escape = gluon_luci.escape,
- urlescape = gluon_luci.urlescape,
- }) %>
- </p>
- <% if not self.embedded then %>
- <form method="post" enctype="multipart/form-data" action="<%=REQUEST_URI%>">
- <div>
- <script type="text/javascript" src="<%=resource%>/cbi.js"></script>
- <input type="hidden" name="token" value="<%=token%>" />
- <input type="hidden" name="cbi.submit" value="1" />
- </div>
- <% end %>
- <div class="cbi-map" id="cbi-<%=self.config%>">
- <% if self.title and #self.title > 0 then %><h2><a id="content" name="content"><%=self.title%></a></h2><% end %>
- <% if self.description and #self.description > 0 then %><div class="cbi-map-descr"><%=self.description%></div><% end %>
- <% self:render_children() %>
- <br />
- </div>
- <%- if self.message then %>
- <div><%=self.message%></div>
- <%- end %>
- <%- if self.errmessage then %>
- <div class="error"><%=self.errmessage%></div>
- <%- end %>
- <% if not self.embedded then %>
- <div class="cbi-page-actions">
- <%-
- if type(self.hidden) == "table" then
- for k, v in pairs(self.hidden) do
- -%>
- <input type="hidden" id="<%=k%>" name="<%=k%>" value="<%=pcdata(v)%>" />
- <%-
- end
- end
- %>
- <input class="cbi-button cbi-button-save" type="submit" value="<%:Save & restart%>" />
- <script type="text/javascript">cbi_d_update();</script>
- </div>
- </form>
- <% end %>
|