mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Merge pull request #8661 from SuprajaRamesh/fixing-missing-translation
Fixing missing translation for "Are you sure?" when deleting a product
This commit is contained in:
@@ -144,7 +144,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
$scope.variantIdCounter
|
||||
|
||||
$scope.deleteProduct = (product) ->
|
||||
if confirm("Are you sure?")
|
||||
if confirm(t('are_you_sure'))
|
||||
$http(
|
||||
method: "DELETE"
|
||||
url: "/api/v0/products/" + product.id
|
||||
|
||||
@@ -822,6 +822,7 @@ describe "AdminProductEditCtrl", ->
|
||||
$scope.dirtyProducts = {}
|
||||
$httpBackend.expectDELETE("/api/v0/products/13").respond 200, "data"
|
||||
$scope.deleteProduct $scope.products[1]
|
||||
expect(window.confirm).toHaveBeenCalledWith "Are you sure?"
|
||||
$httpBackend.flush()
|
||||
|
||||
it "removes the specified product from both $scope.products and $scope.dirtyProducts (if it exists there)", ->
|
||||
|
||||
Reference in New Issue
Block a user