protocols/pptp: fix string
[project/luci.git] / protocols / pptp / luasrc / model / cbi / admin_network / proto_pptp.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11 ]]--
12
13 local map, section, net = ...
14
15 local server, username, password
16 local buffering, defaultroute, metric, peerdns, dns
17
18
19 server = section:taboption("general", Value, "server", translate("VPN Server"))
20 server.datatype = "host"
21
22
23 username = section:taboption("general", Value, "username", translate("PAP/CHAP username"))
24
25
26 password = section:taboption("general", Value, "password", translate("PAP/CHAP password"))
27 password.password = true
28
29
30 buffering = section:taboption("advanced", Flag, "buffering", translate("Enable buffering"))
31 buffering.default = buffering.enabled
32
33
34 defaultroute = section:taboption("advanced", Flag, "defaultroute",
35 translate("Use default gateway"),
36 translate("If unchecked, no default route is configured"))
37
38 defaultroute.default = defaultroute.enabled
39
40
41 metric = section:taboption("advanced", Value, "metric",
42 translate("Use gateway metric"))
43
44 metric.placeholder = "0"
45 metric.datatype = "uinteger"
46 metric:depends("defaultroute", defaultroute.enabled)
47
48
49 peerdns = section:taboption("advanced", Flag, "peerdns",
50 translate("Use DNS servers advertised by peer"),
51 translate("If unchecked, the advertised DNS server addresses are ignored"))
52
53 peerdns.default = peerdns.enabled
54
55
56 dns = section:taboption("advanced", DynamicList, "dns",
57 translate("Use custom DNS servers"))
58
59 dns:depends("peerdns", "")
60 dns.datatype = "ipaddr"