|
1 | 1 | <div class="govuk-!-margin-bottom-6"> |
2 | | - <%= render "govuk_publishing_components/components/fieldset", { |
3 | | - legend_text: "Limit access", |
4 | | - heading_level: 3, |
5 | | - heading_size: "m", |
6 | | - } do %> |
7 | | - <%= form.hidden_field :access_limited, value: "disabled" %> |
8 | | - |
9 | | - <%= render "govuk_publishing_components/components/checkboxes", { |
| 2 | + <%= render "govuk_publishing_components/components/radio", { |
| 3 | + heading: "Limit access", |
10 | 4 | name: "edition[access_limited]", |
11 | 5 | id: "edition_access_limited", |
12 | | - error_items: errors_for(edition.errors, :access_limited), |
13 | 6 | items: [ |
14 | 7 | { |
15 | | - label: "Limit access to publishers from organisations associated with this document before you publish", |
16 | | - value: "organisations", |
17 | | - checked: edition.access_limited?, |
| 8 | + value: :disabled, |
| 9 | + text: "No – This document should be available to all publishers", |
| 10 | + bold: true, |
| 11 | + checked: edition.disabled?, |
| 12 | + }, |
| 13 | + { |
| 14 | + value: :organisations, |
| 15 | + text: "Limit access to publishers from organisations associated with this document", |
| 16 | + bold: true, |
| 17 | + checked: edition.organisations?, |
| 18 | + }, |
| 19 | + { |
| 20 | + value: :named_users, |
| 21 | + text: "Limit access to named publishers", |
| 22 | + bold: true, |
| 23 | + checked: edition.named_users?, |
| 24 | + conditional: (render "govuk_publishing_components/components/textarea", { |
| 25 | + label: { |
| 26 | + text: "Add publishers who will have access", |
| 27 | + bold: true, |
| 28 | + }, |
| 29 | + name: "edition[access_limited_named_users]", |
| 30 | + textarea_id: "edition_access_limited_named_users", |
| 31 | + error_message: nil, |
| 32 | + value: nil, |
| 33 | + hint: "Add the emails of the publishers who will have access to this document before publishing. After publishing the document will be available to all publishers in the organisation associated with this document" |
| 34 | + }), |
18 | 35 | }, |
19 | 36 | ], |
20 | 37 | } %> |
21 | | - <% end %> |
22 | 38 | </div> |
0 commit comments