tn_search.rb

 1form!
 2title "Search Telephone Numbers"
 3
 4if @error
 5	instructions @error
 6else
 7	instructions(
 8		"You can search for a telephone number you like, for example by " \
 9		"an area code (like 810) or a state code (like MI)."
10	)
11end
12
13field(
14	var: "q",
15	type: "text-single",
16	label: "Search Telephone Numbers",
17	description:
18		"Enter one of: area code; zip or postal code; state or province code; " \
19		"six or seven digit number prefix; city, state/province code; " \
20		"or indicate a vanity pattern with ~"
21)
22
23action_options = [
24	{ label: "Search", value: "next" },
25	{ label: "Just Show Me Some Numbers", value: "feelinglucky" }
26]
27if @allow_data_only
28	action_options << { label: "Just Data, Please", value: "data_only" }
29end
30
31field(
32	label: "Action",
33	type: "list-single",
34	var: "http://jabber.org/protocol/commands#actions",
35	options: action_options,
36	value: "next"
37)
38
39xml.set(xmlns: "http://jabber.org/protocol/rsm")