Skip to content

Commit

Permalink
Better confirm message for claiming a person
Browse files Browse the repository at this point in the history
  • Loading branch information
moveson committed Dec 17, 2024
1 parent 1ff47d1 commit f1cfdf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/people/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
<div class="row">
<div class="col d-inline-flex justify-content-between">
<div>
<% if @presenter.unclaimed? && current_user&.authorized_to_claim?(@presenter.person) %>
<% if @presenter.unclaimed? && user_signed_in? && current_user.authorized_to_claim?(@presenter.person) %>
<%= button_to "This is me", avatar_claim_person_path(@presenter.person),
class: "btn btn-success",
class: "btn btn-outline-success",
method: :patch,
data: {
turbo_confirm: "Is this really you? (Please cancel if you were just kidding.)",
turbo_confirm: t(".confirm_person_claimed", user_email: current_user.email, person_full_name: @presenter.full_name),
}
%>
<% end %>
Expand Down
4 changes: 4 additions & 0 deletions config/locales/views.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ en:
new:
callout_detail_paragraph: 'Import Jobs run in the background, allowing you to do other work while the import is ongoing. You can check the status of any of your import jobs at any time by clicking "Imports" on the top menu bar.'

people:
show:
confirm_person_claimed: "This action will associate your user (%{user_email}) with %{person_full_name}. This will allow you to quickly access your results, lottery service requirements, and other information from the My Stuff view. Please ensure this is really you before claiming this Person. This action can be undone only by a site administrator.\n\nClick OK to complete the assignment or Cancel to return without assigning."

raw_times:
index:
no_raw_times_main: "No raw times have been recorded for this Event Group"
Expand Down

0 comments on commit f1cfdf2

Please sign in to comment.