diff --git a/src/views/email.js b/src/views/email.js index 70a168620..f4449412b 100644 --- a/src/views/email.js +++ b/src/views/email.js @@ -466,9 +466,11 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio } }; - function collapseDnsRecords() { + function resetDnsRecords() { $scope.expectedDnsRecordsTypes.forEach(function (record) { var type = record.value; + $scope.expectedDnsRecords[type] = {}; + $('#collapse_dns_' + type).collapse('hide'); }); @@ -503,7 +505,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio $scope.refreshDomain = function () { $scope.refreshBusy = true; - collapseDnsRecords(); + resetDnsRecords(); Client.getMailConfigForDomain($scope.selectedDomain.domain, function (error, mailConfig) { if (error) {