diff --git a/src/app/views/apps/modals/app-settings-modal.coffee b/src/app/views/apps/modals/app-settings-modal.coffee index 6e1bb40f..2aa8fd49 100755 --- a/src/app/views/apps/modals/app-settings-modal.coffee +++ b/src/app/views/apps/modals/app-settings-modal.coffee @@ -192,15 +192,25 @@ angular.module 'mnoEnterpriseAngular' ) $scope.disconnect = -> - $scope.isDisconnecting = true - MnoeAppInstances.disconnect(app) - .then((response) -> - app.addon_organization.has_account_linked = false - app.addon_organization.sync_enabled = false - $uibModalInstance.close() - toastr.success("Your application has been disconnected") + modalOptions = + closeButtonText: 'mno_enterprise.templates.impac.dock.settings.disconnect.modal.cancel' + actionButtonText: 'mno_enterprise.templates.impac.dock.settings.disconnect.modal.action' + headerText: 'mno_enterprise.templates.impac.dock.settings.disconnect.modal.header' + headerTextExtraData: {appname: app.app_name} + bodyText: 'mno_enterprise.templates.impac.dock.settings.disconnect.modal.body' + bodyTextExtraData: {appname: app.app_name} + + MnoConfirm.showModal(modalOptions).then( + -> $scope.isDisconnecting = false - ) + MnoeAppInstances.disconnect(app) + .then((response) -> + app.addon_organization.has_account_linked = false + app.addon_organization.sync_enabled = false + $uibModalInstance.close() + toastr.success("Your application has been disconnected") + ).finally(-> $scope.isDisconnecting = false) + ) $scope.sortableSyncsServerPipe = (tableState)-> $scope.syncs.sort = updateTableSort(tableState.sort, $scope.syncs.sort) diff --git a/src/locales/en.json b/src/locales/en.json index 6325b83a..5563fa91 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -495,6 +495,11 @@ "mno_enterprise.templates.impac.dock.settings.id_maps.type": "Type", "mno_enterprise.templates.impac.dock.settings.id_maps.status": "Status", "mno_enterprise.templates.impac.dock.settings.disconnect_app": "Disconnect", + "mno_enterprise.templates.impac.dock.settings.disconnect.modal.cancel": "Cancel", + "mno_enterprise.templates.impac.dock.settings.disconnect.modal.action": "Disconnect app", + "mno_enterprise.templates.impac.dock.settings.disconnect.modal.header": "Disconnect {appname}?", + "mno_enterprise.templates.impac.dock.settings.disconnect.modal.body": "Are you sure you want to disconnect {appname} and Maestrano?", + "mno_enterprise.templates.impac.dock.settings.disconnect.modal.success": "Your application has been disconnected", "mno_enterprise.templates.impac.dock.add_more_apps": "Add more apps", "mno_enterprise.templates.impac.dock.cancel": "Cancel", "mno_enterprise.templates.impac.dock.do_not_have_apps": "It looks like you don't have any apps",