1form!
2
3title "Plan Settings"
4
5instructions(
6 "Your plan includes #{@customer.message_limit} and " \
7 "#{@customer.minute_limit}. JMP will always prompt for your explicit " \
8 "consent before allowing any action which would incur more overage in a " \
9 "calendar month than your configured limits below."
10)
11
12field(
13 var: "monthly_overage_limit",
14 type: "text-single",
15 datatype: "xs:integer",
16 label: "Dollars of overage to allow each month",
17 description:
18 "0 means you will never be automatically charged more " \
19 "than your monthly fee",
20 value: @customer.monthly_overage_limit.to_s
21)
22
23if @sims && !@sims.empty?
24 monthly_data_limit_options =
25 (0..@monthly_data_limit_max).step(@monthly_data_limit_step).map { |value|
26 { value: value.to_s }
27 }
28
29 field(
30 var: "monthly_data_limit",
31 type: "text-single",
32 datatype: "xs:integer",
33 label: "Dollars of data charges to allow each month",
34 description:
35 "0 means you will never be automatically charged",
36 value: (@data_limit || @monthly_data_limit_step).to_s,
37 range: (0..@monthly_data_limit_max),
38 options: monthly_data_limit_options
39 )
40end