|
@@ -1,13 +1,14 @@
|
|
|
local cbi = require "luci.cbi"
|
|
|
local i18n = require "luci.i18n"
|
|
|
local uci = luci.model.uci.cursor()
|
|
|
+local site = require 'gluon.site_config'
|
|
|
|
|
|
local M = {}
|
|
|
|
|
|
function M.section(form)
|
|
|
local s = form:section(cbi.SimpleSection, nil, i18n.translate(
|
|
|
- 'You can provide your contact information here to '
|
|
|
- .. 'allow others to contact you. Please note that '
|
|
|
+ 'Please provide your contact information here to '
|
|
|
+ .. 'allow others to contact you. Note that '
|
|
|
.. 'this information will be visible <em>publicly</em> '
|
|
|
.. 'on the internet together with your node\'s coordinates.'
|
|
|
)
|
|
@@ -15,7 +16,7 @@ function M.section(form)
|
|
|
|
|
|
local o = s:option(cbi.Value, "_contact", i18n.translate("Contact info"))
|
|
|
o.default = uci:get_first("gluon-node-info", "owner", "contact", "")
|
|
|
- o.rmempty = true
|
|
|
+ o.rmempty = not ((site.config_mode or {}).owner or {}).obligatory
|
|
|
o.datatype = "string"
|
|
|
o.description = i18n.translate("e.g. E-mail or phone number")
|
|
|
o.maxlen = 140
|