diff --git a/lib/flipper/ui/public/js/application.js b/lib/flipper/ui/public/js/application.js index c62e5a5c1..e00d670db 100644 --- a/lib/flipper/ui/public/js/application.js +++ b/lib/flipper/ui/public/js/application.js @@ -5,7 +5,7 @@ $(function () { }); $("#enable_feature__button").on("click", function (e) { - const featureName = $("#feature_name").val(); + const featureName = $(e.target).data("confirmation-text"); const promptMessage = prompt( `Are you sure you want to fully enable this feature for everyone? Please enter the name of the feature to confirm it: ${featureName}` ); @@ -16,7 +16,7 @@ $(function () { }); $("#delete_feature__button").on("click", function (e) { - const featureName = $("#feature_name").val(); + const featureName = $(e.target).data("confirmation-text"); const promptMessage = prompt( `Are you sure you want to remove this feature from the list of features and disable it for everyone? Please enter the name of the feature to confirm it: ${featureName}` ); diff --git a/lib/flipper/ui/views/feature.erb b/lib/flipper/ui/views/feature.erb index 6670cec28..e6fc66425 100644 --- a/lib/flipper/ui/views/feature.erb +++ b/lib/flipper/ui/views/feature.erb @@ -243,6 +243,9 @@