From 5836a82ff721c58d3e7ca3cf92e41db39e28d119 Mon Sep 17 00:00:00 2001 From: shibao Date: Mon, 4 Jul 2022 21:39:28 -0400 Subject: [PATCH] add note about ammo when deleting ammo type --- CHANGELOG.md | 1 + lib/cannery_web/live/ammo_type_live/index.ex | 2 +- lib/cannery_web/live/ammo_type_live/show.html.heex | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b846f19..a93075e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - URL paths now reflect new names - Add pack and round count to container information - Add cute logo >:3 Thank you [kalli](https://twitter.com/t0kkuro)! +- Add note about deleting an ammo type deleting all ammo of that type as well # v0.5.3 - Update French translation: Thank you [duponin](https://udongein.xyz/users/duponin)! diff --git a/lib/cannery_web/live/ammo_type_live/index.ex b/lib/cannery_web/live/ammo_type_live/index.ex index 25e51420..f8ed72af 100644 --- a/lib/cannery_web/live/ammo_type_live/index.ex +++ b/lib/cannery_web/live/ammo_type_live/index.ex @@ -137,7 +137,7 @@ defmodule CanneryWeb.AmmoTypeLive.Index do phx_click: "delete", phx_value_id: ammo_type.id, data: [ - confirm: dgettext("prompts", "Are you sure you want to delete this ammo?"), + confirm: dgettext("prompts", "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!", name: ammo_type.name), qa: "delete-#{ammo_type.id}" ] do %> diff --git a/lib/cannery_web/live/ammo_type_live/show.html.heex b/lib/cannery_web/live/ammo_type_live/show.html.heex index 3d980a89..6873c6f1 100644 --- a/lib/cannery_web/live/ammo_type_live/show.html.heex +++ b/lib/cannery_web/live/ammo_type_live/show.html.heex @@ -24,7 +24,7 @@ phx_click: "delete", data: [ confirm: - dgettext("prompts", "Are you sure you want to delete %{name}?", name: @ammo_type.name), + dgettext("prompts", "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!", name: @ammo_type.name), qa: "delete" ] do %>