Class: Renalware::Forms::Generic::Homecare::V1::PrescriptionDurations
- Defined in:
- lib/renalware/forms/generic/homecare/v1/prescription_durations.rb
Overview
List our the available prescription_durations and is selected_prescription_duration supplied then mark that one as checked.
Constant Summary
Constants inherited from Base
Constants inherited from Base
Base::CHECKBOX, Base::EMPTY_CHECKBOX
Instance Method Summary collapse
Methods inherited from Base
Methods inherited from Base
#borderless_table_style, #cell_with_leading_checkbox, #cell_with_trailing_checkbox, #underlined_table_style
Instance Method Details
#build ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/renalware/forms/generic/homecare/v1/prescription_durations.rb', line 8 def build font_size 10 move_down 20 row = [heading("Repeat prescription for:")] args.prescription_durations.each do |duration| checked = duration == args.selected_prescription_duration row.concat << cell_with_leading_checkbox(duration, checked: checked) end table( [row], **table_styles(border_width: 0, padding: [1, 30, 1, 0]), column_widths: { 0 => 150 } ) end |