+ privileges they will have."))
+s.anonymous = true
+s.addremove = true
+
+num = s:option(DynamicList, "callthrough_number_list", translate("Call-through Numbers"),
+ translate("Specify numbers individually here. Press enter to add more numbers. \
+ You will have to experiment with what country and area codes you need to add \
+ to the number."))
+num.datatype = "uinteger"
+
+p = s:option(ListValue, "enabled", translate("Enabled"))
+p:value("yes", translate("Yes"))
+p:value("no", translate("No"))
+p.default = "yes"
+
+user = s:option(Value, "defaultuser", translate("User Name"),
+ translate("The number(s) specified above will be able to dial out with this user's providers. \
+ Invalid usernames, including users not enabled for outgoing calls, are dropped silently. \
+ Please verify that the entry was accepted."))
+function user.write(self, section, value)
+ trimuser = luci.util.trim(value)
+ if allvalidusers[trimuser] == true then
+ Value.write(self, section, trimuser)
+ end
+end
+
+pwd = s:option(Value, "pin", translate("PIN"),
+ translate("Your PIN disappears when saved for your protection. It will be changed \
+ only when you enter a value different from the saved one. Leaving the PIN \
+ empty is possible, but please beware of the security implications."))
+pwd.password = true
+pwd.rmempty = false
+
+-- We skip reading off the saved value and return nothing.
+function pwd.cfgvalue(self, section)
+ return ""
+end
+
+-- We check the entered value against the saved one, and only write if the entered value is
+-- something other than the empty string, and it differes from the saved value.
+function pwd.write(self, section, value)
+ local orig_pwd = m:get(section, self.option)
+ if value and #value > 0 and orig_pwd ~= value then
+ Value.write(self, section, value)
+ end
+end
+
+----------------------------------------------------------------------------------------------------
+s = m:section(TypedSection, "callback_numbers", translate("Call-back Numbers"),
+ translate("Designate numbers to whom the system will hang up and call back, which provider will \
+ be used to call them, and which user's privileges will be granted to them."))