Merge pull request #125 from cmgustavo/feature/05-send-form

Improve send form: check if address is valid using bitcore
This commit is contained in:
Ryan X. Charles 2014-04-22 18:26:42 -03:00
commit c92498a028
4 changed files with 33 additions and 11 deletions

View file

@ -79,7 +79,7 @@
<!-- Templates -->
<script type="text/ng-template" id="signin.html">
<div ng-controller="SigninController">
<div class="signin" ng-controller="SigninController">
<div data-alert class="alert-box info round" ng-show="loading">
Connecting to wallet...
</div>
@ -378,11 +378,11 @@
<div class="large-12 columns">
<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">is valid!</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">
is not valid</small>
not valid</small>
</label>
<input type="text" id="address" name="address" placeholder="Send to" ng-model="address" ng-minlength="20" ng-maxlength="37" required>
<input type="text" id="address" name="address" placeholder="Send to" ng-model="address" valid-address required>
</div>
</div>
@ -391,9 +391,9 @@
<div class="row collapse">
<label for="amount">Amount
<small ng-hide="!sendForm.amount.$pristine">required</small>
<small class="is-valid" ng-show="!sendForm.amount.$invalid && !sendForm.amount.$pristine">is valid!</small>
<small class="is-valid" ng-show="!sendForm.amount.$invalid && !sendForm.amount.$pristine">valid!</small>
<small class="has-error" ng-show="sendForm.amount.$invalid && !sendForm.amount.$pristine">
is not valid</small>
not valid</small>
</label>
<div class="small-9 columns">
<input type="number" id="amount" name="amount" placeholder="Amount" ng-model="amount" min="0.0001" max="10000000" required>