Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change link text instead of adding labels on my account #948

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/views/user/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
- your_details.with_row do |row|
- row.with_key { 'Name' }
- row.with_value(text: current_user.name, classes: %w[data-hj-suppress])
- row.with_action(text: t('links.change'), href: edit_registration_name_path, html_attributes: { id: :edit_name_registration, aria: { label: 'Change name' } })
- row.with_action(text: 'Change name', href: edit_registration_name_path, html_attributes: { id: :edit_name_registration })
- your_details.with_row do |row|
- row.with_key { 'Email' }
- row.with_value(text:current_user.email, classes: %w[data-hj-suppress])
- row.with_action(text: t('links.change'), href: edit_email_user_path, html_attributes: { id: :edit_email_user, aria: { label: 'Change email' } })
- row.with_action(text: 'Change email', href: edit_email_user_path, html_attributes: { id: :edit_email_user })
- your_details.with_row do |row|
- row.with_key { 'Password' }
- row.with_value { t('my_account.password_changed', date: current_user.password_last_changed) }
- row.with_action(text: t('links.change'), href: edit_password_user_path, html_attributes: { id: :edit_password_user, aria: { label: 'Change password' } })
- row.with_action(text: 'Change password', href: edit_password_user_path, html_attributes: { id: :edit_password_user })

= govuk_summary_list do |other_details|
- other_details.with_row do |row|
- row.with_key { m('my_account.setting_details') }
- row.with_value { nil }
- row.with_action(text: t('links.change'), href: edit_registration_setting_type_path, html_attributes: { id: :edit_setting_type_registration, aria: { label: 'Change setting details' } })
- row.with_action(text: 'Change setting details', href: edit_registration_setting_type_path, html_attributes: { id: :edit_setting_type_registration })
- other_details.with_row do |row|
- row.with_key { 'Setting type' }
- row.with_value(text: current_user.setting_name, classes: %w[data-hj-suppress])
Expand All @@ -45,7 +45,7 @@
- email_preferences.with_row do |row|
- row.with_key { 'Email updates about this training course' }
- row.with_value(text: t(current_user.training_emails_recipient?, scope: 'my_account.training_emails'), classes: %w[data-hj-suppress])
- row.with_action(text: t('links.change'), href: edit_training_emails_user_path, html_attributes: { id: :edit_training_emails_user, aria: { label: 'Change email preferences' } })
- row.with_action(text: 'Change email preferences', href: edit_training_emails_user_path, html_attributes: { id: :edit_training_emails_user })

= m('my_account.closing.information')
= govuk_button_link_to t('my_account.closing.button'), new_user_close_account_path
1 change: 0 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ en:
na: Not applicable

links:
change: Change
save: Save
continue: Continue
cancel: Cancel
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/seed_snippets_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
subject(:locales) { described_class.new.call }

it 'converts all translations' do
expect(locales.count).to be 177
expect(locales.count).to be 176
end

it 'dot separated key -> Page::Resource#name' do
Expand Down
Loading