diff --git a/src/theme.scss b/src/theme.scss index 80890ee7b..0daf32cc6 100644 --- a/src/theme.scss +++ b/src/theme.scss @@ -442,7 +442,7 @@ multiselect { } .card { - min-height: 314px; + min-height: 349px; } .col-md-2 { diff --git a/src/views/app.html b/src/views/app.html index c60410100..58bffb2b6 100644 --- a/src/views/app.html +++ b/src/views/app.html @@ -151,6 +151,7 @@
Access Control
Resources
Security
+
Email
Updates
Backups
Debug
@@ -421,13 +422,14 @@
-
+
+

Addresses ending with '.app' are reserved.

{{ email.error.mailboxName }}
-
- +
+
-

-
- This app is configured to send mail using {{app.domain}}'s Outbound Email settings. -

+
+ +

This app is configured to send mail using {{app.domain}}'s Outbound Email settings.

@@ -448,11 +449,7 @@
-
- Saved -
- -
+
diff --git a/src/views/app.js b/src/views/app.js index 0a91e7d72..11d9ae508 100644 --- a/src/views/app.js +++ b/src/views/app.js @@ -356,14 +356,23 @@ angular.module('Application').controller('AppController', ['$scope', '$location' }, submit: function () { + $scope.email.error = {}; $scope.email.busy = true; - // TODO + Client.configureApp($scope.app.id, 'mailbox', { mailboxName: $scope.email.mailboxNameEnabled ? $scope.email.mailboxName : null }, function (error) { + if (error && error.statusCode === 400) { + $scope.email.busy = false; + $scope.email.error.mailboxName = error.message; + $scope.emailForm.$setPristine(); + return; + } + if (error) return Client.error(error); - $scope.email.success = true; - $scope.email.busy = false; + $scope.email.success = true; + $scope.email.busy = false; - trackAppTask(); + trackAppTask(); + }); } };