diff --git a/app/js/directives.js b/app/js/directives.js
index f2a491db..1d71d20f 100644
--- a/app/js/directives.js
+++ b/app/js/directives.js
@@ -368,7 +368,7 @@ angular.module('myApp.directives', ['myApp.filters'])
})
- .directive('mySendForm', function ($timeout, AppConfigManager) {
+ .directive('mySendForm', function ($timeout, AppConfigManager, ErrorService) {
return {
link: link,
@@ -530,12 +530,10 @@ angular.module('myApp.directives', ['myApp.filters'])
var blob = new Blob([array], {type: contentType});
- if (safeConfirm('Are you sure to send file(s) from clipboard?')) {
- $scope.$apply(function () {
- $scope.draftMessage.files = [blob];
- $scope.draftMessage.isMedia = true;
- });
- }
+ ErrorService.confirm({type: 'FILE_CLIPBOARD_PASTE'}).then(function () {
+ $scope.draftMessage.files = [blob];
+ $scope.draftMessage.isMedia = true;
+ });
}
};
@@ -551,8 +549,8 @@ angular.module('myApp.directives', ['myApp.filters'])
}
}
- if (files.length && safeConfirm('Are you sure to send file(s) from clipboard?')) {
- $scope.$apply(function () {
+ if (files.length > 0) {
+ ErrorService.confirm({type: 'FILES_CLIPBOARD_PASTE', files: files}).then(function () {
$scope.draftMessage.files = files;
$scope.draftMessage.isMedia = true;
});
diff --git a/app/partials/confirm_modal.html b/app/partials/confirm_modal.html
index c9cb1a08..80143612 100644
--- a/app/partials/confirm_modal.html
+++ b/app/partials/confirm_modal.html
@@ -9,6 +9,14 @@
A new version of Webogram is available. Load it?
Are you sure? This can not be undone!
Are you sure you want to log out all devices except for the current one?
+
+
+
+
+
+ Are you sure to send file(s) from clipboard?
+
@@ -21,6 +29,8 @@