Rename func and put error below the control label

This commit is contained in:
Girish Ramakrishnan
2019-09-24 00:04:31 -07:00
parent 44f62eac9a
commit 7946f5ee81
4 changed files with 6 additions and 5 deletions

View File

@@ -176,13 +176,13 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
sso: !$scope.appInstall.optionalSso ? undefined : ($scope.appInstall.accessRestrictionOption !== 'nosso')
};
Client.getDNSRecords(data.domain, data.location, function (error, result) {
Client.checkDNSRecords(data.domain, data.location, function (error, result) {
if (error) return Client.error(error);
if (!data.overwriteDns) {
if (result.error || result.needsOverwrite) {
$scope.appInstall.needsOverwrite = true;
$scope.appInstall.error.location = result.error ? result.error.message : 'DNS Record already exists outside of Cloudron. Resubmit to overwrite.';
$scope.appInstall.error.location = result.error ? result.error.message : 'DNS Record already exists. Confirm that the domain is not in use for services external to Cloudron';
$scope.appInstall.busy = false;
$scope.appInstallForm.location.$setPristine();
$('#appInstallLocationInput').focus();