gluon-config-mode: allow using templates for texts again
This commit is contained in:
parent
a3ed0dde1f
commit
5c121c1608
@ -64,7 +64,7 @@ function action_reboot()
|
||||
|
||||
if nixio.fork() ~= 0 then
|
||||
luci.template.render("gluon-config-mode/reboot",
|
||||
{pubkey=pubkey, hostname=hostname, site=site})
|
||||
{luci=luci, pubkey=pubkey, hostname=hostname, site=site})
|
||||
else
|
||||
debug.setfenv(io.stdout, debug.getfenv(io.open '/dev/null'))
|
||||
io.stdout:close()
|
||||
|
@ -1,10 +1,12 @@
|
||||
<%-
|
||||
local site = require 'gluon.site_config'
|
||||
local sysconfig = require 'gluon.sysconfig'
|
||||
local template = require 'luci.template'
|
||||
-%>
|
||||
|
||||
<h2>Willkommen!</h2>
|
||||
<p>
|
||||
<%= site.config_mode.msg_welcome %>
|
||||
<%= template.render_string(site.config_mode.msg_welcome, {hostname=hostname, sysconfig=sysconfig}) %>
|
||||
</p>
|
||||
|
||||
<% if not self.embedded then %>
|
||||
|
@ -13,17 +13,17 @@
|
||||
<% if pubkey then %>
|
||||
<fieldset class="cbi-section">
|
||||
<p>
|
||||
<%= site.config_mode.msg_pubkey %>
|
||||
<%= luci.template.render_string(site.config_mode.msg_pubkey) %>
|
||||
</p>
|
||||
<div class="the-key">
|
||||
# Hostname: <%= hostname %>
|
||||
# <%= hostname %>
|
||||
<br/>
|
||||
<%= pubkey %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<fieldset class="cbi-section">
|
||||
<%= site.config_mode.msg_reboot %>
|
||||
<%= luci.template.render_string(site.config_mode.msg_reboot) %>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user