fixed address validation

This commit is contained in:
Mario Colque 2014-05-07 11:21:30 -03:00
parent 159ceee88b
commit d2708a353d
2 changed files with 6 additions and 5 deletions

View File

@ -455,9 +455,9 @@
<div class="large-12 columns">
<div class="row collapse">
<label for="address">To address
<small ng-hide="!sendForm.address.$pristine">required</small>
<small class="is-valid" ng-show="!sendForm.address.$invalid && !sendForm.address.$pristine">valid!</small>
<small class="has-error" ng-show="sendForm.address.$invalid && !sendForm.address.$pristine">
<small ng-hide="!sendForm.address.$pristine || address">required</small>
<small class="is-valid" ng-show="!sendForm.address.$invalid && address">valid!</small>
<small class="has-error" ng-show="sendForm.address.$invalid && address">
not valid</small>
</label>
<div class="small-10 columns">

View File

@ -148,8 +148,9 @@ angular.module('copay.send').controller('SendController',
var str = (data.indexOf('bitcoin:') === 0) ? data.substring(8) : data;
console.log('QR code detected: ' + str);
$scope.address = str;
$scope.$digest();
$scope.$apply(function() {
$scope.address = str;
});
};
$scope.cancelScanner = function() {