~singpolyma/sgx-jmp

sgx-jmp/forms/configure_calls.rb -rw-r--r-- 1.1 KiB
c2b986f8Stephen Paul Weber Fix test broken by hotfix 12 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
form!
title "Configure Calls"

field(
	var: "fwd[timeout]",
	type: "text-single",
	datatype: "xs:integer",
	label: "Seconds to ring before voicemail",
	description: "One ring is ~5 seconds. Negative means ring forever.",
	value: @customer.fwd.timeout.to_i.to_s
)

field(
	var: "voicemail_transcription",
	type: "boolean",
	label: "Voicemail transcription",
	value: @customer.transcription_enabled.to_s
)

field(
	var: "fwd[uri]",
	type: "list-single",
	datatype: "xs:anyURI",
	open: true,
	label: "Forward calls to",
	description: "List item or any custom xmpp:, sip:, or tel: URI.",
	options: [
		{ label: "Jabber ID", value: "xmpp:#{@customer.jid}" },
		{ label: "SIP Account", value: @customer.sip_account.uri }
	],
	value: @customer.fwd.uri
)

if (lidb = @customer.tndetails.dig(:features, :lidb))
	field(
		var: "lidb_name",
		type: "fixed",
		label: "CNAM",
		value: "#{lidb[:subscriber_information]} (#{lidb[:status]})"
	)
elsif @customer.tndetails[:on_net_vendor]
	field(
		var: "lidb_name",
		type: "text-single",
		label: "CNAM Name",
		description: "or nothing/space to leave blank"
	)
end