disabled save button for name change until value is different than stored name

This commit is contained in:
Jamal Jackson 2016-10-19 13:22:24 -04:00
commit ea900a1729
2 changed files with 8 additions and 1 deletions

View file

@ -23,4 +23,11 @@ angular.module('copayApp.controllers').controller('preferencesAliasController',
$ionicHistory.goBack();
});
};
$scope.valueCheck = function() {
if ($scope.alias.value == wallet.credentials.walletName || $scope.alias.value == '') $scope.disableSave = true;
else $scope.disableSave = false;
};
$scope.$watch('alias.value', function(newvalue, oldvalue) {
$scope.valueCheck();
});
});