Skip to content

Commit

Permalink
Update calls to textarea with the id option
Browse files Browse the repository at this point in the history
  • Loading branch information
andysellick committed Jan 22, 2025
1 parent 409ba6a commit 8cf5e99
Show file tree
Hide file tree
Showing 34 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/calls_for_evidence/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/consultations/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/contact_translations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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?,
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/contacts/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/edition_access_limited/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/edition_images/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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. <a class='govuk-link' href='https://www.gov.uk/guidance/content-design/images'>Read the image copyright standards</a>. The text appears next to the image."),
Expand All @@ -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"),
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/edition_translations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/editions/_change_notes.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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") +
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/editorial_remarks/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
} %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/fact_check_requests/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
bold: true,
},
name: "fact_check_request[comments]",
id: "fact_check_request_comments",
textarea_id: "fact_check_request_comments",
rows: 20,
} %>

Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/fatality_notices/_casualty_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
2 changes: 1 addition & 1 deletion app/views/admin/fatality_notices/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
} %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/historical_accounts/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/offsite_links/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/organisation_translations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/organisations/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/person_translations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/policy_groups/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/role_translations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/sitewide_settings/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/statistics_announcements/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/topical_event_about_pages/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/worldwide_offices/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
} %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/worldwide_organisations/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/views/components/_govspeak_editor.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<div class="app-c-govspeak-editor__textarea">
<%= render "govuk_publishing_components/components/textarea", {
name: name,
id: id,
textarea_id: id,
rows: rows,
value: value,
error_items: error_items,
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_republishing_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}) %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
} %>
Expand Down

0 comments on commit 8cf5e99

Please sign in to comment.