Allow user to remove terms and conditions file

This commit is contained in:
Luis Ramos
2020-08-18 19:20:11 +01:00
parent 24cdd0c467
commit 66587ccc00
10 changed files with 91 additions and 3 deletions

View File

@@ -82,6 +82,13 @@ angular.module("admin.enterprises")
.then $scope.removeImageSuccessCallback("removed_promo_image_successfully"),
$scope.removeImageSuccessCallback()
$scope.removeTermsAndConditions = ->
return unless confirm($scope.translation("immediate_terms_and_conditions_removal_warning"))
Enterprises.removeTermsAndConditions($scope.Enterprise)
.then $scope.removeImageSuccessCallback("removed_terms_and_conditions_successfully"),
$scope.removeImageSuccessCallback()
$scope.removeImageSuccessCallback = (success_message_key) ->
(data) ->
$scope.Enterprise = angular.copy(data)