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