fixed address validation

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

View file

@ -455,9 +455,9 @@
<div class="large-12 columns"> <div class="large-12 columns">
<div class="row collapse"> <div class="row collapse">
<label for="address">To address <label for="address">To address
<small ng-hide="!sendForm.address.$pristine">required</small> <small ng-hide="!sendForm.address.$pristine || address">required</small>
<small class="is-valid" ng-show="!sendForm.address.$invalid && !sendForm.address.$pristine">valid!</small> <small class="is-valid" ng-show="!sendForm.address.$invalid && address">valid!</small>
<small class="has-error" ng-show="sendForm.address.$invalid && !sendForm.address.$pristine"> <small class="has-error" ng-show="sendForm.address.$invalid && address">
not valid</small> not valid</small>
</label> </label>
<div class="small-10 columns"> <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; var str = (data.indexOf('bitcoin:') === 0) ? data.substring(8) : data;
console.log('QR code detected: ' + str); console.log('QR code detected: ' + str);
$scope.address = str; $scope.$apply(function() {
$scope.$digest(); $scope.address = str;
});
}; };
$scope.cancelScanner = function() { $scope.cancelScanner = function() {