Amazon: not allow to buy gift card for amounts with more than 2 decimal places. Adds a confirmation before to purchase
This commit is contained in:
parent
3424894a11
commit
a8f212474a
5 changed files with 17 additions and 13 deletions
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
<form class="m20t"
|
||||
name="buyAmazonForm"
|
||||
ng-submit="buy.createTx()"
|
||||
ng-submit="buy.confirm()"
|
||||
novalidate>
|
||||
|
||||
<div class="card list">
|
||||
|
|
@ -46,17 +46,17 @@
|
|||
min="0.01"
|
||||
max="500"
|
||||
ng-model="fiat"
|
||||
ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/"
|
||||
autocomplete="off" ignore-mouse-wheel required>
|
||||
<a class="postfix">USD</a>
|
||||
</label>
|
||||
|
||||
<wallets ng-if="wallets[0]" wallets="wallets"></wallets>
|
||||
</div>
|
||||
|
||||
<wallets ng-if="wallets[0]" wallets="wallets"></wallets>
|
||||
|
||||
<button class="button button-block button-positive"
|
||||
ng-disabled="!fiat"
|
||||
type="submit"
|
||||
value="Buy now">
|
||||
type="submit">
|
||||
Buy now
|
||||
</button>
|
||||
<div class="size-10 text-gray text-center">
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
<div class="card">
|
||||
<div class="item item-icon-left text-right">
|
||||
<i class="icon ion-briefcase size-21" ng-style="{'color':wallet.color}"></i>
|
||||
<span>{{wallet.name || wallet.id}}</span>
|
||||
<span class="item-note" ng-show="wallet.n > 1 && wallet.isComplete()">
|
||||
<span>{{wallet.name || wallet.id}}</span>
|
||||
<span class="item-note m10l" ng-show="wallet.n > 1 && wallet.isComplete()">
|
||||
{{wallet.m}}-of-{{wallet.n}}
|
||||
</span>
|
||||
<span class="badge badge-assertive" ng-show="!wallet.isComplete()" translate>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,14 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
|
|||
});
|
||||
};
|
||||
|
||||
this.confirm = function() {
|
||||
var title = gettextCatalog.getString('Confirm Amazon.com Gift Card purchase for ${{amount}} USD', {amount: $scope.fiat});
|
||||
var ok = gettextCatalog.getString('Buy');
|
||||
popupService.showConfirm(title, null, ok, null, function(res) {
|
||||
if (res) self.createTx();
|
||||
});
|
||||
};
|
||||
|
||||
this.createTx = function() {
|
||||
self.errorInfo = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -889,7 +889,7 @@ input[type=file] {
|
|||
}
|
||||
|
||||
.wallets {
|
||||
height: 90px;
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
.bar .button.back-button {
|
||||
|
|
|
|||
|
|
@ -21,13 +21,9 @@
|
|||
&.swiper-slide-next{
|
||||
left:4%;
|
||||
}
|
||||
span{
|
||||
float:right;
|
||||
clear:both;
|
||||
}
|
||||
}
|
||||
}
|
||||
.swiper-pagination{
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue