From 8cf5e99ed34436f9dbddac1f1e307b41fc554b8b Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Tue, 21 Jan 2025 11:58:01 +0000 Subject: [PATCH] Update calls to textarea with the id option --- .../admin/editions/fact_checking_tab_component.html.erb | 2 +- app/views/admin/calls_for_evidence/_form.html.erb | 2 +- app/views/admin/consultations/_form.html.erb | 2 +- app/views/admin/contact_translations/edit.html.erb | 2 +- app/views/admin/contacts/_form.html.erb | 2 +- app/views/admin/edition_access_limited/edit.html.erb | 2 +- app/views/admin/edition_images/edit.html.erb | 4 ++-- app/views/admin/edition_translations/edit.html.erb | 4 ++-- app/views/admin/editions/_change_notes.html.erb | 2 +- app/views/admin/editorial_remarks/new.html.erb | 2 +- app/views/admin/fact_check_requests/edit.html.erb | 2 +- app/views/admin/fatality_notices/_casualty_fields.html.erb | 2 +- app/views/admin/fatality_notices/_form.html.erb | 2 +- app/views/admin/historical_accounts/_form.html.erb | 4 ++-- app/views/admin/offsite_links/_form.html.erb | 2 +- app/views/admin/organisation_translations/edit.html.erb | 2 +- app/views/admin/organisations/_form.html.erb | 2 +- app/views/admin/person_translations/edit.html.erb | 2 +- app/views/admin/policy_groups/_form.html.erb | 2 +- .../admin/promotional_feature_items/_form_fields.html.erb | 2 +- app/views/admin/role_translations/edit.html.erb | 2 +- app/views/admin/sitewide_settings/_form.html.erb | 2 +- .../admin/statistics_announcement_date_changes/new.html.erb | 2 +- .../admin/statistics_announcements/_cancel_form.html.erb | 2 +- app/views/admin/statistics_announcements/_form.html.erb | 2 +- app/views/admin/topical_event_about_pages/_form.html.erb | 2 +- .../admin/world_location_news_translations/edit.html.erb | 2 +- app/views/admin/worldwide_office_translations/edit.html.erb | 2 +- app/views/admin/worldwide_offices/_form.html.erb | 2 +- .../worldwide_organisation_page_translations/edit.html.erb | 4 ++-- app/views/admin/worldwide_organisations/_form.html.erb | 2 +- app/views/components/_govspeak_editor.html.erb | 2 +- app/views/shared/_republishing_form.html.erb | 2 +- .../content_block_manager/content_block/shared/_form.html.erb | 2 +- 34 files changed, 38 insertions(+), 38 deletions(-) diff --git a/app/components/admin/editions/fact_checking_tab_component.html.erb b/app/components/admin/editions/fact_checking_tab_component.html.erb index a3337a5f82a..6351d5b4a64 100644 --- a/app/components/admin/editions/fact_checking_tab_component.html.erb +++ b/app/components/admin/editions/fact_checking_tab_component.html.erb @@ -49,7 +49,7 @@ bold: true, }, name: "fact_check_request[instructions]", - id: "fact_check_request_instructions", + textarea_id: "fact_check_request_instructions", } %> <%= render "govuk_publishing_components/components/button", { diff --git a/app/views/admin/calls_for_evidence/_form.html.erb b/app/views/admin/calls_for_evidence/_form.html.erb index 281dc54419f..ee1294344be 100644 --- a/app/views/admin/calls_for_evidence/_form.html.erb +++ b/app/views/admin/calls_for_evidence/_form.html.erb @@ -77,7 +77,7 @@ heading_size: "m", }, name: "edition[call_for_evidence_participation_attributes][postal_address]", - id: "edition_call_for_evidence_participation_postal_address", + textarea_id: "edition_call_for_evidence_participation_postal_address", value: call_for_evidence_participation.postal_address, error_items: errors_for(call_for_evidence_participation.errors, :postal_address), rows: 4, diff --git a/app/views/admin/consultations/_form.html.erb b/app/views/admin/consultations/_form.html.erb index 61dd02135e1..b65a0bc28f4 100644 --- a/app/views/admin/consultations/_form.html.erb +++ b/app/views/admin/consultations/_form.html.erb @@ -76,7 +76,7 @@ heading_size: "m", }, name: "edition[consultation_participation_attributes][postal_address]", - id: "edition_consultation_participation_postal_address", + textarea_id: "edition_consultation_participation_postal_address", value: consultation_participation.postal_address, error_items: errors_for(consultation_participation.errors, :postal_address), rows: 4, diff --git a/app/views/admin/contact_translations/edit.html.erb b/app/views/admin/contact_translations/edit.html.erb index 16817117bb1..98d220f956c 100644 --- a/app/views/admin/contact_translations/edit.html.erb +++ b/app/views/admin/contact_translations/edit.html.erb @@ -30,7 +30,7 @@ text: "Comments", }, name: "contact[comments]", - id: "contact_comments", + textarea_id: "contact_comments", value: @translated_contact.comments, error_items: errors_for(form.object.errors, :comments), right_to_left: @translated_contact.translation_locale.rtl?, diff --git a/app/views/admin/contacts/_form.html.erb b/app/views/admin/contacts/_form.html.erb index ee8568fe8a8..5a4964a6862 100644 --- a/app/views/admin/contacts/_form.html.erb +++ b/app/views/admin/contacts/_form.html.erb @@ -22,7 +22,7 @@ heading_size: "l", }, name: "contact[comments]", - id: "contact_comments", + textarea_id: "contact_comments", hint: "Optional instructions for this contact", value: contact_form.object.comments, error_items: errors_for(contact_form.object.errors, :comments), diff --git a/app/views/admin/edition_access_limited/edit.html.erb b/app/views/admin/edition_access_limited/edit.html.erb index bf5eed7edaa..5c803684ab9 100644 --- a/app/views/admin/edition_access_limited/edit.html.erb +++ b/app/views/admin/edition_access_limited/edit.html.erb @@ -25,7 +25,7 @@ heading_size: "l", }, name: "edition[editorial_remark]", - id: "edition_editorial_remark", + textarea_id: "edition_editorial_remark", error_items: errors_for(@edition.errors, :editorial_remark), hint: "Please explain why this change is required", rows: 20, diff --git a/app/views/admin/edition_images/edit.html.erb b/app/views/admin/edition_images/edit.html.erb index b67a3d0527c..45d4538629c 100644 --- a/app/views/admin/edition_images/edit.html.erb +++ b/app/views/admin/edition_images/edit.html.erb @@ -15,7 +15,7 @@ heading_size: "l", }, name: "image[caption]", - id: "image_caption", + textarea_id: "image_caption", value: image.caption, rows: 2, hint: raw("Name a person in a photo or add image credit. Read the image copyright standards. The text appears next to the image."), @@ -35,7 +35,7 @@ heading_size: "l", }, name: "image[alt_text]", - id: "image_alt_text", + textarea_id: "image_alt_text", value: image.alt_text, rows: 5, hint: tag.p("You should write the alt text description in the body copy below the image so it’s available to everyone.", class: "govuk-!-margin-bottom-0 govuk-!-margin-top-0"), diff --git a/app/views/admin/edition_translations/edit.html.erb b/app/views/admin/edition_translations/edit.html.erb index 3273760d1bb..797eeaedff3 100644 --- a/app/views/admin/edition_translations/edit.html.erb +++ b/app/views/admin/edition_translations/edit.html.erb @@ -35,7 +35,7 @@ text: "Translated summary#{' (required)' unless @edition.is_a?(CorporateInformationPage)}", }, name: "edition[summary]", - id: "edition_summary", + textarea_id: "edition_summary", value: @translated_edition.summary, rows: 2, error_items: errors_for(form.object.errors, :summary), @@ -54,7 +54,7 @@ text: "Translated body (required)", }, name: "edition[body]", - id: "edition_body", + textarea_id: "edition_body", value: @translated_edition.body, rows: 20, error_items: errors_for(form.object.errors, :body), diff --git a/app/views/admin/editions/_change_notes.html.erb b/app/views/admin/editions/_change_notes.html.erb index 7f29605a4ec..8cc0ffa1df3 100644 --- a/app/views/admin/editions/_change_notes.html.erb +++ b/app/views/admin/editions/_change_notes.html.erb @@ -34,7 +34,7 @@ bold: true, }, name: "edition[change_note]", - id: "edition_change_note", + textarea_id: "edition_change_note", error_message: errors_for_input(edition.errors, :change_note), value: edition.change_note, hint: (tag.p('Tell users what has changed, where and why. Write in full sentences, leading with the most important words. For example, "College A has been removed from the registered sponsors list because its licence has been suspended."', class: "govuk-!-margin-bottom-0 govuk-!-margin-top-0") + diff --git a/app/views/admin/editorial_remarks/new.html.erb b/app/views/admin/editorial_remarks/new.html.erb index a98e46cc3c2..f0bd356dbf9 100644 --- a/app/views/admin/editorial_remarks/new.html.erb +++ b/app/views/admin/editorial_remarks/new.html.erb @@ -17,7 +17,7 @@ bold: true, }, name: "editorial_remark[body]", - id: "editorial_remark_body", + textarea_id: "editorial_remark_body", error_items: errors_for(@editorial_remark.errors, :body), rows: 20, } %> diff --git a/app/views/admin/fact_check_requests/edit.html.erb b/app/views/admin/fact_check_requests/edit.html.erb index d17af8e510f..33bf83ab9af 100644 --- a/app/views/admin/fact_check_requests/edit.html.erb +++ b/app/views/admin/fact_check_requests/edit.html.erb @@ -39,7 +39,7 @@ bold: true, }, name: "fact_check_request[comments]", - id: "fact_check_request_comments", + textarea_id: "fact_check_request_comments", rows: 20, } %> diff --git a/app/views/admin/fatality_notices/_casualty_fields.html.erb b/app/views/admin/fatality_notices/_casualty_fields.html.erb index 9758ff073f1..7ae735ccb19 100644 --- a/app/views/admin/fatality_notices/_casualty_fields.html.erb +++ b/app/views/admin/fatality_notices/_casualty_fields.html.erb @@ -6,7 +6,7 @@ }, value: fatality_form.object.personal_details, name: "edition[fatality_notice_casualties_attributes][#{index}][personal_details]", - id: "edition_fatality_notice_casualties_#{index}_personal_details", + textarea_id: "edition_fatality_notice_casualties_#{index}_personal_details", rows: 2, } %> <% end %> diff --git a/app/views/admin/fatality_notices/_form.html.erb b/app/views/admin/fatality_notices/_form.html.erb index f5793e126f5..5963b387407 100644 --- a/app/views/admin/fatality_notices/_form.html.erb +++ b/app/views/admin/fatality_notices/_form.html.erb @@ -27,7 +27,7 @@ }, value: edition.roll_call_introduction, name: "edition[roll_call_introduction]", - id: "edition_roll_call_introduction", + textarea_id: "edition_roll_call_introduction", error_items: errors_for(edition.errors, :roll_call_introduction), rows: 2, } %> diff --git a/app/views/admin/historical_accounts/_form.html.erb b/app/views/admin/historical_accounts/_form.html.erb index 606558bf944..79166abc9f0 100644 --- a/app/views/admin/historical_accounts/_form.html.erb +++ b/app/views/admin/historical_accounts/_form.html.erb @@ -75,7 +75,7 @@ text: "Major acts", heading_size: "l", }, - id: "historical_account_major_acts", + textarea_id: "historical_account_major_acts", name: "historical_account[major_acts]", value: historical_account.major_acts, rows: 4, @@ -87,7 +87,7 @@ text: "Interesting facts", heading_size: "l", }, - id: "historical_account_interesting_facts", + textarea_id: "historical_account_interesting_facts", name: "historical_account[interesting_facts]", value: historical_account.interesting_facts, rows: 4, diff --git a/app/views/admin/offsite_links/_form.html.erb b/app/views/admin/offsite_links/_form.html.erb index 9085265bf31..b370491e4f6 100644 --- a/app/views/admin/offsite_links/_form.html.erb +++ b/app/views/admin/offsite_links/_form.html.erb @@ -15,7 +15,7 @@ text: "Summary (required)", heading_size: "l", }, - id: "offsite_link_summary", + textarea_id: "offsite_link_summary", name: "offsite_link[summary]", value: offsite_link.summary, rows: 3, diff --git a/app/views/admin/organisation_translations/edit.html.erb b/app/views/admin/organisation_translations/edit.html.erb index 62dff781bb2..6b387b0f361 100644 --- a/app/views/admin/organisation_translations/edit.html.erb +++ b/app/views/admin/organisation_translations/edit.html.erb @@ -48,7 +48,7 @@ text: "Logo formatted name (required)", }, name: "organisation[logo_formatted_name]", - id: "organisation_logo_formatted_name", + textarea_id: "organisation_logo_formatted_name", value: @translated_organisation.logo_formatted_name, rows: 4, error_items: errors_for(@translated_organisation.errors, :logo_formatted_name), diff --git a/app/views/admin/organisations/_form.html.erb b/app/views/admin/organisations/_form.html.erb index ef41fe636db..c1676e692e3 100644 --- a/app/views/admin/organisations/_form.html.erb +++ b/app/views/admin/organisations/_form.html.erb @@ -31,7 +31,7 @@ heading_size: "l", }, name: "organisation[logo_formatted_name]", - id: "organisation_logo_formatted_name", + textarea_id: "organisation_logo_formatted_name", value: organisation.logo_formatted_name, rows: 4, error_items: errors_for(organisation.errors, :logo_formatted_name), diff --git a/app/views/admin/person_translations/edit.html.erb b/app/views/admin/person_translations/edit.html.erb index dac193c079d..75e9d85592d 100644 --- a/app/views/admin/person_translations/edit.html.erb +++ b/app/views/admin/person_translations/edit.html.erb @@ -12,7 +12,7 @@ text: "Biography", }, name: "person[biography]", - id: "person_biography", + textarea_id: "person_biography", value: @translated_person.biography, rows: 20, error_items: errors_for(@translated_person.errors, :biography), diff --git a/app/views/admin/policy_groups/_form.html.erb b/app/views/admin/policy_groups/_form.html.erb index f4c5cdafa54..f1bac1fa3c6 100644 --- a/app/views/admin/policy_groups/_form.html.erb +++ b/app/views/admin/policy_groups/_form.html.erb @@ -27,7 +27,7 @@ heading_size: "l", }, name: "policy_group[summary]", - id: "policy_group_summary", + textarea_id: "policy_group_summary", value: policy_group.summary, error_items: errors_for(policy_group.errors, :summary), rows: 4, diff --git a/app/views/admin/promotional_feature_items/_form_fields.html.erb b/app/views/admin/promotional_feature_items/_form_fields.html.erb index 075a47191f7..849f50bf669 100644 --- a/app/views/admin/promotional_feature_items/_form_fields.html.erb +++ b/app/views/admin/promotional_feature_items/_form_fields.html.erb @@ -26,7 +26,7 @@ heading_size: heading_size, }, name: "#{name}[summary]", - id: "#{id}_summary", + textarea_id: "#{id}_summary", value: promotional_feature_item.summary, error_items: errors_for(promotional_feature_item.errors, :summary), rows: 4, diff --git a/app/views/admin/role_translations/edit.html.erb b/app/views/admin/role_translations/edit.html.erb index f04f3035723..310417229a7 100644 --- a/app/views/admin/role_translations/edit.html.erb +++ b/app/views/admin/role_translations/edit.html.erb @@ -30,7 +30,7 @@ text: "Responsibilities", }, name: "role[responsibilities]", - id: "role_responsibilities", + textarea_id: "role_responsibilities", value: @translated_role.responsibilities, rows: 20, error_items: errors_for(form.object.errors, :responsibilities), diff --git a/app/views/admin/sitewide_settings/_form.html.erb b/app/views/admin/sitewide_settings/_form.html.erb index ef4f511a6fa..f3b3852c487 100644 --- a/app/views/admin/sitewide_settings/_form.html.erb +++ b/app/views/admin/sitewide_settings/_form.html.erb @@ -30,7 +30,7 @@ text: "Can you provide more detail in Govspeak?", }, name: "sitewide_setting[govspeak]", - id: "sitewide_setting_govspeak", + textarea_id: "sitewide_setting_govspeak", error_message: errors_for_input(sitewide_setting.errors, :govspeak), hint: "Please check this is valid govspeak.", value: sitewide_setting.govspeak %> diff --git a/app/views/admin/statistics_announcement_date_changes/new.html.erb b/app/views/admin/statistics_announcement_date_changes/new.html.erb index 4cfa243030b..fe45b210c67 100644 --- a/app/views/admin/statistics_announcement_date_changes/new.html.erb +++ b/app/views/admin/statistics_announcement_date_changes/new.html.erb @@ -87,7 +87,7 @@ text: "Public change note (required)", heading_size: "l", }, - id: "statistics_announcement_date_change_change_note", + textarea_id: "statistics_announcement_date_change_change_note", name: "statistics_announcement_date_change[change_note]", value: @statistics_announcement_date_change.change_note, error_message: errors_for_input(@statistics_announcement_date_change.errors, :change_note), diff --git a/app/views/admin/statistics_announcements/_cancel_form.html.erb b/app/views/admin/statistics_announcements/_cancel_form.html.erb index 8b973255c1e..39b6dcdd22f 100644 --- a/app/views/admin/statistics_announcements/_cancel_form.html.erb +++ b/app/views/admin/statistics_announcements/_cancel_form.html.erb @@ -10,7 +10,7 @@ heading_size: "m", }, value: statistics_announcement.cancellation_reason, - id: "statistics_announcement_cancellation_reason", + textarea_id: "statistics_announcement_cancellation_reason", name: "statistics_announcement[cancellation_reason]", rows: 5, error_message: errors_for_input(statistics_announcement.errors, :cancellation_reason), diff --git a/app/views/admin/statistics_announcements/_form.html.erb b/app/views/admin/statistics_announcements/_form.html.erb index 4eed6aecc0b..ee1f19e0267 100644 --- a/app/views/admin/statistics_announcements/_form.html.erb +++ b/app/views/admin/statistics_announcements/_form.html.erb @@ -45,7 +45,7 @@ heading_size: "l", }, value: statistics_announcement.summary, - id: "statistics_announcement_summary", + textarea_id: "statistics_announcement_summary", name: "statistics_announcement[summary]", rows: 5, error_message: errors_for_input(statistics_announcement.errors, :summary), diff --git a/app/views/admin/topical_event_about_pages/_form.html.erb b/app/views/admin/topical_event_about_pages/_form.html.erb index ebeaf9ef5ea..5abd4f45470 100644 --- a/app/views/admin/topical_event_about_pages/_form.html.erb +++ b/app/views/admin/topical_event_about_pages/_form.html.erb @@ -31,7 +31,7 @@ value: topical_event_about_page.summary, heading_size: "l", name: "topical_event_about_page[summary]", - id: "topical_event_about_page_summary", + textarea_id: "topical_event_about_page_summary", error_items: errors_for(topical_event_about_page.errors, :summary), } %> <%= render "components/govspeak_editor", { diff --git a/app/views/admin/world_location_news_translations/edit.html.erb b/app/views/admin/world_location_news_translations/edit.html.erb index 85ce181923a..dc5bb45f97c 100644 --- a/app/views/admin/world_location_news_translations/edit.html.erb +++ b/app/views/admin/world_location_news_translations/edit.html.erb @@ -56,7 +56,7 @@ heading_size: "l", }, name: "world_location_news[mission_statement]", - id: "world_location_news_mission_statement", + textarea_id: "world_location_news_mission_statement", value: @translated_world_location_news.mission_statement, rows: 10, right_to_left: @translated_world_location_news.translation_locale.rtl?, diff --git a/app/views/admin/worldwide_office_translations/edit.html.erb b/app/views/admin/worldwide_office_translations/edit.html.erb index aeda95de5c4..3b1c2280cdd 100644 --- a/app/views/admin/worldwide_office_translations/edit.html.erb +++ b/app/views/admin/worldwide_office_translations/edit.html.erb @@ -31,7 +31,7 @@ heading_size: "l", }, name: "contact[comments]", - id: "contact_comments", + textarea_id: "contact_comments", value: @translated_contact.comments, rows: 10, error_items: errors_for(@translated_contact.errors, :comments), diff --git a/app/views/admin/worldwide_offices/_form.html.erb b/app/views/admin/worldwide_offices/_form.html.erb index cc7fa8b5c2a..f3fcde63260 100644 --- a/app/views/admin/worldwide_offices/_form.html.erb +++ b/app/views/admin/worldwide_offices/_form.html.erb @@ -72,7 +72,7 @@ heading_size: "l", }, name: "worldwide_office[contact_attributes][comments]", - id: "worldwide_office_contact_attributes_comments", + textarea_id: "worldwide_office_contact_attributes_comments", value: office_form.object.comments, hint: "Optional instructions for this contact", } %> diff --git a/app/views/admin/worldwide_organisation_page_translations/edit.html.erb b/app/views/admin/worldwide_organisation_page_translations/edit.html.erb index 87328e3e06c..6bc1449fac2 100644 --- a/app/views/admin/worldwide_organisation_page_translations/edit.html.erb +++ b/app/views/admin/worldwide_organisation_page_translations/edit.html.erb @@ -13,7 +13,7 @@ text: "Translated summary (required)", }, name: "page[summary]", - id: "page_summary", + textarea_id: "page_summary", value: @translated_page.summary, rows: 2, error_items: errors_for(form.object.errors, :summary), @@ -32,7 +32,7 @@ text: "Translated body (required)", }, name: "page[body]", - id: "page_body", + textarea_id: "page_body", value: @translated_page.body, rows: 20, error_items: errors_for(form.object.errors, :body), diff --git a/app/views/admin/worldwide_organisations/_form.html.erb b/app/views/admin/worldwide_organisations/_form.html.erb index 4cdb2f29cec..c63609447b9 100644 --- a/app/views/admin/worldwide_organisations/_form.html.erb +++ b/app/views/admin/worldwide_organisations/_form.html.erb @@ -5,7 +5,7 @@ heading_size: "l", }, name: "edition[logo_formatted_name]", - id: "edition_logo_formatted_name", + textarea_id: "edition_logo_formatted_name", value: edition.logo_formatted_name, error_items: errors_for(edition.errors, :logo_formatted_name), rows: 4, diff --git a/app/views/components/_govspeak_editor.html.erb b/app/views/components/_govspeak_editor.html.erb index a65a34ec0fb..8e5442d44a9 100644 --- a/app/views/components/_govspeak_editor.html.erb +++ b/app/views/components/_govspeak_editor.html.erb @@ -78,7 +78,7 @@
<%= render "govuk_publishing_components/components/textarea", { name: name, - id: id, + textarea_id: id, rows: rows, value: value, error_items: error_items, diff --git a/app/views/shared/_republishing_form.html.erb b/app/views/shared/_republishing_form.html.erb index 0efff0f5ad4..8e272f627cc 100644 --- a/app/views/shared/_republishing_form.html.erb +++ b/app/views/shared/_republishing_form.html.erb @@ -7,7 +7,7 @@ heading_size: "m", }, name: "reason", - id: "republishing_event_reason", + textarea_id: "republishing_event_reason", error_items: errors_for(republishing_event.errors, :reason), }) %> diff --git a/lib/engines/content_block_manager/app/views/content_block_manager/content_block/shared/_form.html.erb b/lib/engines/content_block_manager/app/views/content_block_manager/content_block/shared/_form.html.erb index 9db7c134cf4..51d91ac34ac 100644 --- a/lib/engines/content_block_manager/app/views/content_block_manager/content_block/shared/_form.html.erb +++ b/lib/engines/content_block_manager/app/views/content_block_manager/content_block/shared/_form.html.erb @@ -48,7 +48,7 @@ text: "Instructions to publishers (optional)", }, name: "content_block/edition[instructions_to_publishers]", - id: "#{parent_class}_instructions_to_publishers", + textarea_id: "#{parent_class}_instructions_to_publishers", value: @form.content_block_edition&.instructions_to_publishers, error_items: errors_for(@form.content_block_edition.errors, "instructions_to_publishers".to_sym), } %>