|
1 | 1 | <%= form_with(
|
2 | 2 | model: @triage,
|
3 |
| - url: @url, |
4 |
| - method: @method, |
| 3 | + url:, |
| 4 | + method: :post, |
5 | 5 | builder: GOVUKDesignSystemFormBuilder::FormBuilder,
|
6 | 6 | ) do |f| %>
|
7 | 7 | <% content_for(:before_content) { f.govuk_error_summary } %>
|
8 | 8 |
|
9 |
| - <%= f.govuk_radio_buttons_fieldset(:status, **fieldset_options) do %> |
10 |
| - <%= f.govuk_radio_button( |
11 |
| - :status, :ready_to_vaccinate, |
12 |
| - label: { text: "Yes, it’s safe to vaccinate" }, |
13 |
| - link_errors: true, |
14 |
| - ) %> |
| 9 | + <%= f.govuk_radio_buttons_fieldset :status, **fieldset_options do %> |
| 10 | + <%= f.govuk_radio_button :status, :ready_to_vaccinate, |
| 11 | + label: { text: "Yes, it’s safe to vaccinate" }, |
| 12 | + link_errors: true %> |
| 13 | + |
15 | 14 | <%= f.govuk_radio_divider %>
|
16 |
| - <%= f.govuk_radio_button( |
17 |
| - :status, :do_not_vaccinate, |
18 |
| - label: { text: "No, do not vaccinate" }, |
19 |
| - ) %> |
20 |
| - <%= f.govuk_radio_button( |
21 |
| - :status, :delay_vaccination, |
22 |
| - label: { text: "No, delay vaccination (and invite to clinic)" }, |
23 |
| - ) %> |
24 |
| - <%= f.govuk_radio_button( |
25 |
| - :status, :needs_follow_up, |
26 |
| - label: { text: "No, keep in triage" }, |
27 |
| - ) %> |
| 15 | + |
| 16 | + <%= f.govuk_radio_button :status, :do_not_vaccinate, |
| 17 | + label: { text: "No, do not vaccinate" } %> |
| 18 | + |
| 19 | + <%= f.govuk_radio_button :status, :delay_vaccination, |
| 20 | + label: { text: "No, delay vaccination (and invite to clinic)" } %> |
| 21 | + |
| 22 | + <%= f.govuk_radio_button :status, :needs_follow_up, |
| 23 | + label: { text: "No, keep in triage" } %> |
28 | 24 | <% end %>
|
29 | 25 |
|
30 |
| - <%= f.govuk_text_area( |
31 |
| - :notes, |
32 |
| - label: { text: "Triage notes (optional)" }, |
33 |
| - rows: 5, |
34 |
| - ) %> |
| 26 | + <%= f.govuk_text_area :notes, |
| 27 | + label: { text: "Triage notes (optional)" }, |
| 28 | + rows: 5 %> |
35 | 29 |
|
36 |
| - <%= f.govuk_submit @method == :put ? "Continue" : "Save triage" %> |
| 30 | + <%= f.govuk_submit @triage.new_record? ? "Save triage" : "Continue" %> |
37 | 31 | <% end %>
|
0 commit comments