From b7573f449f0a4bfbb94ce4b3ec26fe2d3a903bb5 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Mon, 9 Apr 2018 12:45:00 +0200 Subject: [PATCH] Remove mailbox inline editing --- dashboard/src/views/email.html | 10 ++++------ dashboard/src/views/email.js | 33 --------------------------------- 2 files changed, 4 insertions(+), 39 deletions(-) diff --git a/dashboard/src/views/email.html b/dashboard/src/views/email.html index 2d93e4b74..63879836f 100644 --- a/dashboard/src/views/email.html +++ b/dashboard/src/views/email.html @@ -195,16 +195,14 @@ {{ mailbox.name }} - + {{ mailbox.owner.display }} -

{{ mailbox.error }}

- + {{ mailbox.aliases }} - - - + + diff --git a/dashboard/src/views/email.js b/dashboard/src/views/email.js index ce94df669..3da93802a 100644 --- a/dashboard/src/views/email.js +++ b/dashboard/src/views/email.js @@ -289,39 +289,6 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio }); }); }); - }, - - submit: function (mailbox) { - mailbox.busy = true; - mailbox.error =''; - - var aliases = mailbox.aliases.split(',').map(function (a) { return a.trim(); }).filter(function (a) { return !!a; }); - - function done(error) { - mailbox.busy = false; - - if (error && error.statusCode === 409) { - var alias = error.message.match(RegExp('\'(.*)-' + $scope.selectedDomain.domain + '\''))[1]; - mailbox.error = alias + '@' + $scope.selectedDomain.domain + ' already exists'; - return; - } else if (error && error.statusCode === 400) { - mailbox.error = error.message; - return; - } else if (error) { - console.error('Unable to configure mailbox.', error); - return; - } - - // reset the dirty state - mailbox.orig.aliases = mailbox.aliases; - mailbox.orig.owner = mailbox.owner; - } - - Client.updateMailbox($scope.selectedDomain.domain, mailbox.name, mailbox.owner.id, function (error) { - if (error) return done(error); - - Client.setAliases($scope.selectedDomain.domain, mailbox.name, aliases, done); - }); } };