From 140f41b40f54feb4fb8d6ddbbdf3c659c779756d Mon Sep 17 00:00:00 2001 From: rwalli Date: Sun, 8 Jul 2018 19:46:10 +0200 Subject: [PATCH] Add description --- .../model/cbi/admin_network/proto_wireguard.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua b/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua index 056f6a6e76..64e256a517 100644 --- a/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua +++ b/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua @@ -5,7 +5,7 @@ local map, section, net = ... local ifname = net:get_interface():name() local private_key, listen_port -local metric, mtu, preshared_key +local metric, mtu, preshared_key, description local peers, public_key, allowed_ips, endpoint, persistent_keepalive @@ -96,6 +96,16 @@ peers.anonymous = true peers.addremove = true +description = peers:option( + Value, + "description", + translate("Description"), + translate("Optional. Description of peer.")) +description.placeholder = "My Peer" +description.datatype = "string" +description.optional = true + + public_key = peers:option( Value, "public_key", -- 2.30.2