On List, Record, Form, Stepped flow, Settings, Field result, Find, Help
Refusal
The remedy first shows the field it moves to.
Booking page
- Address
- oakmere
Two causes, each a Row further down the page.
Payments on invoice OH-INV-003
Not yet on your bank statement
Not yet on your bank statement
Marking both transfers arrived opens the same refund, no longer refused.
A Refusal beneath a Stepped flow's step.
- CompleteFile
- CompleteMapping
- Preview
- Not startedResult
Import is refused while these rows match more than one hirer:
A Refusal inside a Dialog, its causes on the page behind it.
Upcoming bookings in Main Hall
Remove Main Hall
A Refusal on its line alone, with no cause to go to.
Issue refund is refused until both transfers on this invoice have arrived.
A submit refused by two fields, each cause going to its field.
Source
<Kit.Phoenix.Layouts.Form.form subject_state={Kit.Phoenix.State.none()} id="refusal-handle-form">
<:task_context heading="Choose an address"></:task_context>
<:form_groups>
<Kit.Phoenix.Roles.FormGroup.form_group id="refusal-handle-form-group" kind={Kit.Phoenix.Roles.FormGroup.Kind.text(:medium)} control_rest={%{id: "refusal-handle", name: "handle", value: "oakmere"}}><:printed_value>oakmere</:printed_value>
<:label rest={%{for: "refusal-handle"}}>Address</:label>
</Kit.Phoenix.Roles.FormGroup.form_group>
</:form_groups>
<:refusal>
<Kit.Phoenix.Roles.Refusal.refusal id="refusal-handle-taken">
<:line>That address is taken. Choose another.</:line>
<:cause href="#refusal-handle">Use oakmere-hall</:cause>
</Kit.Phoenix.Roles.Refusal.refusal>
</:refusal>
<:submit_return>
<Kit.Phoenix.Roles.PrimaryAction.primary_action>Continue</Kit.Phoenix.Roles.PrimaryAction.primary_action>
<Kit.Phoenix.Roles.WayBack.way_back href="#refusal-booking-page">Return to booking page</Kit.Phoenix.Roles.WayBack.way_back>
</:submit_return>
</Kit.Phoenix.Layouts.Form.form>
<p class="specimen-case-line">The remedy first shows the field it moves to.</p>
<!-- The field the remedy first shows carries phx-mounted={Phoenix.LiveView.JS.focus()}, only when it is absent until an act shows it and never on a field present at page load; a field already present carries phx-patch-focused. -->
<Kit.Phoenix.Layouts.Form.form subject_state={Kit.Phoenix.State.none()} id="refusal-mounted-form">
<:task_context heading="Choose an address"></:task_context>
<:form_groups rest={%{"id" => "refusal-mounted-fields"}}></:form_groups>
<:refusal>
<Kit.Phoenix.Roles.Refusal.refusal id="refusal-mounted-taken">
<:line>That address is taken. Choose another.</:line>
<:cause href="#refusal-mounted-fields">Use oakmere-hall</:cause>
</Kit.Phoenix.Roles.Refusal.refusal>
</:refusal>
<:submit_return>
<Kit.Phoenix.Roles.PrimaryAction.primary_action>Continue</Kit.Phoenix.Roles.PrimaryAction.primary_action>
<Kit.Phoenix.Roles.WayBack.way_back href="#refusal-booking-page">Return to booking page</Kit.Phoenix.Roles.WayBack.way_back>
</:submit_return>
</Kit.Phoenix.Layouts.Form.form>
<Kit.Phoenix.Roles.HeadedRegion.headed_region id="refusal-booking-page" heading="Booking page">
<:content><Kit.Phoenix.Roles.FactGroup.fact_group><Kit.Phoenix.Roles.LabelledFact.labelled_fact><:name>Address</:name><:value>oakmere</:value></Kit.Phoenix.Roles.LabelledFact.labelled_fact></Kit.Phoenix.Roles.FactGroup.fact_group></:content>
</Kit.Phoenix.Roles.HeadedRegion.headed_region>
<p class="specimen-case-line">Two causes, each a Row further down the page.</p>
<Kit.Phoenix.Layouts.Form.form id="role-refusal-form" subject_state={Kit.Phoenix.State.none()}>
<:task_context heading="Issue refund"><Kit.Phoenix.Roles.FactGroup.fact_group><Kit.Phoenix.Roles.LabelledFact.labelled_fact><:name>Hirer</:name><:value>Oakmere Primary School</:value></Kit.Phoenix.Roles.LabelledFact.labelled_fact><Kit.Phoenix.Roles.LabelledFact.labelled_fact><:name>Invoice</:name><:value><Kit.Phoenix.Identifier.identifier value="OH-INV-003" /></:value></Kit.Phoenix.Roles.LabelledFact.labelled_fact></Kit.Phoenix.Roles.FactGroup.fact_group></:task_context>
<:form_groups>
<Kit.Phoenix.Roles.FormGroup.form_group id="refusal-refund-amount-form-group" kind={Kit.Phoenix.Roles.FormGroup.Kind.text(:narrow)}
control_rest={%{id: "refusal-refund-amount", name: "amount", inputmode: "decimal", value: "84.00"}}
><:printed_value>84.00</:printed_value>
<:label rest={%{for: "refusal-refund-amount"}}>Amount (GBP)</:label>
</Kit.Phoenix.Roles.FormGroup.form_group>
<Kit.Phoenix.Roles.FormGroup.form_group kind={Kit.Phoenix.Roles.FormGroup.Kind.text(:medium)} id="refusal-refund-reason-form-group"
control_rest={%{id: "refusal-refund-reason", name: "reason", value: "Returned materials"}}
><:printed_value>Returned materials</:printed_value>
<:label rest={%{for: "refusal-refund-reason"}}>Reason</:label>
</Kit.Phoenix.Roles.FormGroup.form_group>
</:form_groups>
<:consequence>
<Kit.Phoenix.Roles.InlineConsequence.inline_consequence aria-label="Refund invoice OH-INV-003">
<:subject>Invoice OH-INV-003</:subject>
<:consequence>Issuing this refund returns £84.00 to Oakmere Primary School.</:consequence>
<:effective_time>The refund is sent as soon as you confirm.</:effective_time>
<:correction_path>A sent refund cannot be cancelled.</:correction_path>
</Kit.Phoenix.Roles.InlineConsequence.inline_consequence>
</:consequence>
<:refusal>
<Kit.Phoenix.Roles.Refusal.refusal id="refusal-refund-1">
<:line>Issue refund is refused until both transfers on this invoice have arrived:</:line>
<:cause href="#refusal-transfer-march-12">Bank transfer of £60.00 on <Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.day(reader(), ~D[2025-03-12])} /></:cause>
<:cause href="#refusal-transfer-march-14">Bank transfer of £24.00 on <Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.day(reader(), ~D[2025-03-14])} /></:cause>
</Kit.Phoenix.Roles.Refusal.refusal>
</:refusal>
<:submit_return>
<Kit.Phoenix.Roles.PrimaryAction.primary_action type="button">Issue refund</Kit.Phoenix.Roles.PrimaryAction.primary_action><Kit.Phoenix.Roles.WayBack.way_back href="#refusal-payments">Return to invoice</Kit.Phoenix.Roles.WayBack.way_back>
</:submit_return>
</Kit.Phoenix.Layouts.Form.form>
<section id="refusal-payments" aria-labelledby="refusal-payments-title">
<h3 id="refusal-payments-title">Payments on invoice OH-INV-003</h3>
<Kit.Phoenix.Roles.Row.row id="refusal-transfer-march-12">
<:subject>Bank transfer of £60.00 on <Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.day(reader(), ~D[2025-03-12])} /></:subject>
<:facts>Not yet on your bank statement</:facts>
</Kit.Phoenix.Roles.Row.row>
<Kit.Phoenix.Roles.Row.row id="refusal-transfer-march-14">
<:subject>Bank transfer of £24.00 on <Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.day(reader(), ~D[2025-03-14])} /></:subject>
<:facts>Not yet on your bank statement</:facts>
</Kit.Phoenix.Roles.Row.row>
<form action="../form/"><Kit.Phoenix.Roles.SecondaryAction.secondary_action type="submit">Mark both transfers arrived</Kit.Phoenix.Roles.SecondaryAction.secondary_action></form>
<p>Marking both transfers arrived opens the same refund, no longer refused.</p>
</section>
<p class="specimen-case-line">A Refusal beneath a Stepped flow's step.</p>
<Kit.Phoenix.Layouts.SteppedFlow.stepped_flow id="role-refusal-stepped-flow" subject_state={Kit.Phoenix.State.none()} progress_rest={%{"aria-label": "Import progress"}}>
<:progress name="File" state="done" />
<:progress name="Mapping" state="done" />
<:progress name="Preview" state="current" />
<:progress name="Result" state="upcoming" />
<:current_step id="refusal-preview-step" rest={%{"aria-labelledby": "refusal-preview-title"}} heading="Preview hirer import" heading_rest={%{id: "refusal-preview-title"}}>
<Kit.Phoenix.Roles.Row.row id="refusal-row-4">
<:subject>Oakmere Primary School, row 4</:subject>
<:facts>Row outcome: Matches two hirers</:facts>
</Kit.Phoenix.Roles.Row.row>
<Kit.Phoenix.Roles.Row.row id="refusal-row-7">
<:subject>Riverside Scouts, row 7</:subject>
<:facts>Row outcome: Matches two hirers</:facts>
</Kit.Phoenix.Roles.Row.row>
</:current_step>
<:refusal>
<Kit.Phoenix.Roles.Refusal.refusal id="refusal-merge">
<:line>Import is refused while these rows match more than one hirer:</:line>
<:cause href="#refusal-row-4">Oakmere Primary School, row 4</:cause>
<:cause href="#refusal-row-7">Riverside Scouts, row 7</:cause>
</Kit.Phoenix.Roles.Refusal.refusal>
</:refusal>
<:back><Kit.Phoenix.Roles.WayBack.way_back href="#refusal-preview-title">Back to mapping</Kit.Phoenix.Roles.WayBack.way_back></:back>
<:continue_or_commit>Import hirers</:continue_or_commit>
</Kit.Phoenix.Layouts.SteppedFlow.stepped_flow>
<p class="specimen-case-line">A Refusal inside a Dialog, its causes on the page behind it.</p>
<section aria-labelledby="refusal-bookings-title">
<h3 id="refusal-bookings-title">Upcoming bookings in Main Hall</h3>
<Kit.Phoenix.Roles.Row.row id="refusal-booking-yoga">
<:subject>Oakmere Yoga</:subject>
<:facts><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.interval_with_day(reader(), ~U[2026-05-12 17:00:00Z], ~U[2026-05-12 18:30:00Z])} /></:facts>
</Kit.Phoenix.Roles.Row.row>
<Kit.Phoenix.Roles.Row.row id="refusal-booking-scouts">
<:subject>Riverside Scouts</:subject>
<:facts><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.interval_with_day(reader(), ~U[2026-05-15 18:00:00Z], ~U[2026-05-15 20:00:00Z])} /></:facts>
</Kit.Phoenix.Roles.Row.row>
</section>
<details>
<summary>Remove Main Hall</summary>
<Kit.Phoenix.Roles.SecondaryAction.secondary_action id="refusal-remove-hall-dialog-opener">Remove Main Hall</Kit.Phoenix.Roles.SecondaryAction.secondary_action>
<Kit.Phoenix.Roles.Dialog.dialog open id="refusal-remove-hall-dialog" return_focus="refusal-remove-hall-dialog-opener" aria-labelledby="refusal-remove-hall-title">
<:heading rest={%{id: "refusal-remove-hall-title"}}>Remove Main Hall</:heading>
<Kit.Phoenix.Roles.InlineConsequence.inline_consequence region="consequence" aria-label="Remove Main Hall">
<:subject>Main Hall</:subject>
<:consequence>Removing Main Hall takes it off your booking page and out of the diary.</:consequence>
<:effective_time>Takes effect as soon as you confirm.</:effective_time>
<:correction_path>You can restore Main Hall from Trash.</:correction_path>
</Kit.Phoenix.Roles.InlineConsequence.inline_consequence>
<:refusal>
<Kit.Phoenix.Roles.Refusal.refusal id="refusal-remove-hall">
<:line>Remove Main Hall is refused while it has upcoming bookings:</:line>
<:cause href="#refusal-booking-yoga">Oakmere Yoga, <time datetime="2026-05-12T18:00"><span>12 May 2026</span><wbr /><span>, 18:00</span></time></:cause>
<:cause href="#refusal-booking-scouts">Riverside Scouts, <time datetime="2026-05-15T19:00"><span>15 May 2026</span><wbr /><span>, 19:00</span></time></:cause>
</Kit.Phoenix.Roles.Refusal.refusal>
</:refusal>
<:primary_action>Remove hall</:primary_action>
<:secondary_action>Keep hall</:secondary_action>
</Kit.Phoenix.Roles.Dialog.dialog>
</details>
<p class="specimen-case-line">A Refusal on its line alone, with no cause to go to.</p>
<div>
<Kit.Phoenix.Roles.Refusal.refusal id="refusal-refund-line">
<:line>Issue refund is refused until both transfers on this invoice have arrived.</:line>
</Kit.Phoenix.Roles.Refusal.refusal>
<Kit.Phoenix.Roles.ActionGroup.action_group><:lead><Kit.Phoenix.Roles.PrimaryAction.primary_action type="button">Issue refund</Kit.Phoenix.Roles.PrimaryAction.primary_action></:lead></Kit.Phoenix.Roles.ActionGroup.action_group>
</div>
<p class="specimen-case-line">A submit refused by two fields, each cause going to its field.</p>
<form id="refusal-fields-form">
<Kit.Phoenix.Roles.FormGroup.form_group id="refusal-fields-email-form-group" kind={Kit.Phoenix.Roles.FormGroup.Kind.email()}
control_rest={%{id: "refusal-fields-email", name: "email", value: "accounts@"}}
><:printed_value>accounts@</:printed_value>
<:label rest={%{for: "refusal-fields-email"}}>Billing email</:label>
<:error>Enter a complete billing email, such as aisha@oakmereprimary.org.</:error>
</Kit.Phoenix.Roles.FormGroup.form_group>
<Kit.Phoenix.Roles.FormGroup.form_group id="refusal-fields-phone-form-group" kind={Kit.Phoenix.Roles.FormGroup.Kind.telephone()}
control_rest={%{id: "refusal-fields-phone", name: "phone", value: "960 123"}}
><:printed_value>960 123</:printed_value>
<:label rest={%{for: "refusal-fields-phone"}}>Phone</:label>
<:error>Enter the phone number with its area code, such as 01632 960 123.</:error>
</Kit.Phoenix.Roles.FormGroup.form_group>
<Kit.Phoenix.Roles.Refusal.refusal id="refusal-fields">
<:line>2 fields need a change.</:line>
<:cause href="#refusal-fields-email">Enter a complete billing email, such as aisha@oakmereprimary.org.</:cause>
<:cause href="#refusal-fields-phone">Enter the phone number with its area code, such as 01632 960 123.</:cause>
</Kit.Phoenix.Roles.Refusal.refusal>
<Kit.Phoenix.Roles.ActionGroup.action_group><:lead><Kit.Phoenix.Roles.PrimaryAction.primary_action type="button">Save hirer</Kit.Phoenix.Roles.PrimaryAction.primary_action></:lead></Kit.Phoenix.Roles.ActionGroup.action_group>
</form>