On Shell, List, Form, Stepped flow, Settings, Reports, Help
Selection control
Source
<div>
<Kit.Phoenix.Roles.SelectionControl.selection_control name="include-invoices">
<:fact printed_value="Not agreed">I agree to the <a href="../role-redline/#role-redline">terms of hire</a></:fact>
</Kit.Phoenix.Roles.SelectionControl.selection_control>
</div>
<div>
<Kit.Phoenix.Roles.SelectionControl.selection_control kind={Kit.Phoenix.Roles.SelectionControl.Kind.radio()} name="report-delivery" value="email">
<:fact printed_value="Not chosen">Email delivery</:fact>
</Kit.Phoenix.Roles.SelectionControl.selection_control>
</div>
Selection control, checked
Source
<div>
<Kit.Phoenix.Roles.SelectionControl.selection_control name="include-payments" checked>
<:fact printed_value="Agreed">I agree to the <a href="../role-redline/#role-redline">terms of hire</a></:fact>
</Kit.Phoenix.Roles.SelectionControl.selection_control>
</div>
<div>
<Kit.Phoenix.Roles.SelectionControl.selection_control kind={Kit.Phoenix.Roles.SelectionControl.Kind.radio()} name="report-delivery-checked" value="email" checked>
<:fact printed_value="Chosen">Email delivery</:fact>
</Kit.Phoenix.Roles.SelectionControl.selection_control>
</div>
Selection control, mixed
Source
<div>
<label><Kit.Phoenix.Roles.SelectionControl.selection_control kind={Kit.Phoenix.Roles.SelectionControl.Kind.checkbox("select-all-invoices", true)} /><span>All invoices</span></label>
</div>
<div>
<label><Kit.Phoenix.Roles.SelectionControl.selection_control kind={Kit.Phoenix.Roles.SelectionControl.Kind.checkbox("select-all-bookings", false)} checked /><span>All bookings</span></label>
</div>
<div>
<label><Kit.Phoenix.Roles.SelectionControl.selection_control kind={Kit.Phoenix.Roles.SelectionControl.Kind.checkbox("select-all-rooms", false)} /><span>All rooms</span></label>
</div>
Selection control, disabled
Source
<div>
<Kit.Phoenix.Roles.SelectionControl.selection_control name="disabled-rooms" value="garden" disabled>
<:fact printed_value="Not chosen" reason="Taken by Oakmere Choir until March">Garden room</:fact>
</Kit.Phoenix.Roles.SelectionControl.selection_control>
</div>
<div>
<Kit.Phoenix.Roles.SelectionControl.selection_control name="disabled-rooms" value="hall" checked disabled>
<:fact printed_value="Chosen" reason="No longer free on Tuesdays">Main Hall</:fact>
</Kit.Phoenix.Roles.SelectionControl.selection_control>
</div>
<Kit.Phoenix.Roles.SelectionControl.group id="disabled-seats">
<:legend>Seat at the committee table</:legend>
<:choice kind={:radio} control_rest={%{name: "disabled-seats", value: "chair"}} printed_value="Not chosen">Chair</:choice>
<:choice kind={:radio} control_rest={%{name: "disabled-seats", value: "treasurer", disabled: true}} printed_value="Not chosen" reason="Taken by Tom Reid">Treasurer</:choice>
</Kit.Phoenix.Roles.SelectionControl.group>
Selection control, group
You accept the terms of hire when you send this request.
Stop the old collection before starting a new one.
Source
<div>
<Kit.Phoenix.Roles.SelectionControl.group id="request-terms">
<:choice kind={:checkbox} control_rest={%{name: "accept-terms"}} printed_value="Not agreed">I agree to the terms of hire</:choice>
<:help>You accept the terms of hire when you send this request.</:help>
</Kit.Phoenix.Roles.SelectionControl.group>
<Kit.Phoenix.Roles.SelectionControl.group id="selection-wrap-choice">
<:choice kind={:checkbox} control_rest={%{name: "stop-old-collection"}} printed_value="Not confirmed">I have set autopay in my current system to stop after its last collection</:choice>
</Kit.Phoenix.Roles.SelectionControl.group>
<Kit.Phoenix.Roles.SelectionControl.group id="selection-wrap-help">
<:choice kind={:checkbox} control_rest={%{name: "stop-old-collection-with-help"}} printed_value="Not confirmed">I have set autopay in my current system to stop after its last collection</:choice>
<:help>Stop the old collection before starting a new one.</:help>
</Kit.Phoenix.Roles.SelectionControl.group>
<Kit.Phoenix.Roles.SelectionControl.group id="report-delivery">
<:legend>Report delivery</:legend>
<:choice kind={:radio} control_rest={%{name: "report-delivery-group", value: "email"}} checked printed_value="Chosen">Email</:choice>
<:choice kind={:radio} control_rest={%{name: "report-delivery-group", value: "post"}} printed_value="Not chosen">Post</:choice>
<:help>Reports go out on the first of each month.</:help>
</Kit.Phoenix.Roles.SelectionControl.group>
<Kit.Phoenix.Roles.SelectionControl.group id="rule-days">
<:legend>Weekdays this rule covers</:legend>
<:heading>All weekdays</:heading>
<:choice kind={:checkbox} control_rest={%{name: "rule-days", value: "monday"}} checked printed_value="Covered">Monday</:choice>
<:choice kind={:checkbox} control_rest={%{name: "rule-days", value: "tuesday"}} printed_value="Not covered">Tuesday</:choice>
<:choice kind={:checkbox} control_rest={%{name: "rule-days", value: "wednesday"}} checked printed_value="Covered">Wednesday</:choice>
<:choice kind={:checkbox} control_rest={%{name: "rule-days", value: "thursday"}} printed_value="Not covered">Thursday</:choice>
<:choice kind={:checkbox} control_rest={%{name: "rule-days", value: "friday"}} printed_value="Not covered">Friday</:choice>
</Kit.Phoenix.Roles.SelectionControl.group>
<Kit.Phoenix.Roles.SelectionControl.group id="rule-weekend">
<:legend>Weekend days this rule covers</:legend>
<:heading>All weekend days</:heading>
<:choice kind={:checkbox} control_rest={%{name: "rule-weekend", value: "saturday", disabled: true}} checked printed_value="Covered" reason="Set by the opening hours">Saturday</:choice>
<:choice kind={:checkbox} control_rest={%{name: "rule-weekend", value: "sunday", disabled: true}} printed_value="Not covered" reason="Closed on Sundays">Sunday</:choice>
</Kit.Phoenix.Roles.SelectionControl.group>
<Kit.Phoenix.Roles.SelectionControl.radio_group id="class-levels">
<:legend>Levels</:legend>
<:choice kind={:radio} control_rest={%{name: "class-levels", value: "all"}} printed_value="Not chosen">All levels</:choice>
<:choice kind={:radio} control_rest={%{name: "class-levels", value: "named"}} checked printed_value="Chosen">Named levels</:choice>
<:choice kind={:radio} control_rest={%{name: "class-levels", value: "audition"}} printed_value="Not chosen">By audition</:choice>
<:fields choice="named">
<Kit.Phoenix.Roles.SelectionControl.group id="class-levels-named">
<:choice kind={:checkbox} control_rest={%{name: "class-level-names", value: "beginner"}} checked printed_value="Included">Beginner</:choice>
<:choice kind={:checkbox} control_rest={%{name: "class-level-names", value: "intermediate"}} checked printed_value="Included">Intermediate</:choice>
<:choice kind={:checkbox} control_rest={%{name: "class-level-names", value: "advanced"}} printed_value="Not included">Advanced</:choice>
</Kit.Phoenix.Roles.SelectionControl.group>
</:fields>
<:fields choice="audition">
<Kit.Phoenix.Roles.FormGroup.form_group id="class-levels-audition-note-form-group" kind={Kit.Phoenix.Roles.FormGroup.Kind.text(:wide)} control_rest={%{id: "class-levels-audition-note", name: "audition-note", value: "Bring soft shoes"}}>
<:printed_value>Bring soft shoes</:printed_value>
<:label rest={%{for: "class-levels-audition-note"}}>Audition note</:label>
</Kit.Phoenix.Roles.FormGroup.form_group>
</:fields>
<:help>Dancers see these levels when they book.</:help>
</Kit.Phoenix.Roles.SelectionControl.radio_group>
<Kit.Phoenix.Roles.SelectionControl.group id="attendance">
<:legend>Attendance</:legend>
<:choice kind={:checkbox} control_rest={%{name: "attendance[]", value: "late"}} printed_value="Not chosen">Late arrival</:choice>
<:choice kind={:checkbox} control_rest={%{name: "attendance[]", value: "early"}} printed_value="Not chosen">Early departure</:choice>
<:fields choice="late">
<Kit.Phoenix.Roles.FormGroup.form_group id="attendance-arrived-at">
<:label>Arrived at</:label>
<:control :let={binding}>
<Kit.Phoenix.Roles.TimeField.time_field binding={binding} reader={reader()} name="arrived_at" value={Kit.Phoenix.Roles.TimeField.Committed.clock(Kit.Phoenix.Time.clock(reader(), ~T[19:15:00]))} />
</:control>
<:printed_value><time datetime="19:15">19:15</time></:printed_value>
</Kit.Phoenix.Roles.FormGroup.form_group>
</:fields>
<:fields choice="early">
<Kit.Phoenix.Roles.FormGroup.form_group id="attendance-left-at">
<:label>Left at</:label>
<:control :let={binding}>
<Kit.Phoenix.Roles.TimeField.time_field binding={binding} reader={reader()} name="left_at" value={Kit.Phoenix.Roles.TimeField.Committed.clock(Kit.Phoenix.Time.clock(reader(), ~T[20:30:00]))} />
</:control>
<:printed_value><time datetime="20:30">20:30</time></:printed_value>
</Kit.Phoenix.Roles.FormGroup.form_group>
</:fields>
</Kit.Phoenix.Roles.SelectionControl.group>
<Kit.Phoenix.Roles.SelectionControl.group id="class-reminders">
<:legend>Class reminders</:legend>
<:choice kind={:checkbox} control_rest={%{name: "class-reminders", value: "email"}} printed_value="Not chosen" help="Sent the evening before each class.">Email</:choice>
<:choice kind={:checkbox} control_rest={%{name: "class-reminders", value: "text", disabled: true}} printed_value="Not chosen" reason="Add a mobile number to get texts." help="Sent two hours before each class.">Text message</:choice>
<:help>Dancers can change these in their own settings.</:help>
<:error>Choose at least one reminder.</:error>
</Kit.Phoenix.Roles.SelectionControl.group>
</div>
Selection control, group error
You accept the terms of hire when you send this request.
Accept the terms of hire before you send your request.
Accept the terms of hire before you send your request.
Source
<div>
<Kit.Phoenix.Roles.SelectionControl.group id="request-terms-unaccepted">
<:choice kind={:checkbox} control_rest={%{name: "accept-terms-unaccepted"}} printed_value="Not agreed">I agree to the terms of hire</:choice>
<:help>You accept the terms of hire when you send this request.</:help>
<:error>Accept the terms of hire before you send your request.</:error>
</Kit.Phoenix.Roles.SelectionControl.group>
<Kit.Phoenix.Roles.SelectionControl.group id="request-terms-error-only">
<:choice kind={:checkbox} control_rest={%{name: "accept-terms-error-only"}} printed_value="Not agreed">I agree to the terms of hire</:choice>
<:error>Accept the terms of hire before you send your request.</:error>
</Kit.Phoenix.Roles.SelectionControl.group>
<Kit.Phoenix.Roles.SelectionControl.group id="report-delivery-unchosen">
<:legend>Report delivery</:legend>
<:choice kind={:radio} control_rest={%{name: "report-delivery-unchosen", value: "email"}} printed_value="Not chosen">Email</:choice>
<:choice kind={:radio} control_rest={%{name: "report-delivery-unchosen", value: "post"}} printed_value="Not chosen">Post</:choice>
<:help>Reports go out on the first of each month.</:help>
<:error>Choose how your reports reach you.</:error>
</Kit.Phoenix.Roles.SelectionControl.group>
</div>