gluon-config-mode: allow using templates for texts again

This commit is contained in:
Matthias Schiffer 2014-05-16 12:36:01 +02:00
parent e16bfbe309
commit d1cd4a7f53
3 changed files with 7 additions and 5 deletions

View File

@ -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()

View File

@ -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 %>

View File

@ -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>