Cancel/clear form when using payment protocol

This commit is contained in:
Gustavo Maximiliano Cortez 2014-11-20 11:42:56 -03:00
commit cfb7383b2d
2 changed files with 16 additions and 1 deletions

View file

@ -492,6 +492,16 @@ angular.module('copayApp.controllers').controller('SendController',
}
};
$scope.cancelSend = function(form) {
delete $rootScope.merchant;
$rootScope.merchantError = false;
form.address.$setViewValue('');
form.address.$render();
form.amount.$setViewValue('');
form.comment.$setViewValue('');
form.$setPristine();
};
$scope.onChanged = function() {
var value = $scope.address || '';
var uri;