Merge pull request #111 from cmgustavo/ref/design-29

Amazon: not allow to buy gift card for amounts with more than 2 decim…
This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-14 16:36:37 -03:00 committed by GitHub
commit cd6d0a5d1d
5 changed files with 17 additions and 13 deletions

View file

@ -33,7 +33,7 @@
<form class="m20t" <form class="m20t"
name="buyAmazonForm" name="buyAmazonForm"
ng-submit="buy.createTx()" ng-submit="buy.confirm()"
novalidate> novalidate>
<div class="card list"> <div class="card list">
@ -46,17 +46,17 @@
min="0.01" min="0.01"
max="500" max="500"
ng-model="fiat" ng-model="fiat"
ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/"
autocomplete="off" ignore-mouse-wheel required> autocomplete="off" ignore-mouse-wheel required>
<a class="postfix">USD</a> <a class="postfix">USD</a>
</label> </label>
<wallets ng-if="wallets[0]" wallets="wallets"></wallets>
</div> </div>
<wallets ng-if="wallets[0]" wallets="wallets"></wallets>
<button class="button button-block button-positive" <button class="button button-block button-positive"
ng-disabled="!fiat" ng-disabled="!fiat"
type="submit" type="submit">
value="Buy now">
Buy now Buy now
</button> </button>
<div class="size-10 text-gray text-center"> <div class="size-10 text-gray text-center">

View file

@ -4,8 +4,8 @@
<div class="card"> <div class="card">
<div class="item item-icon-left text-right"> <div class="item item-icon-left text-right">
<i class="icon ion-briefcase size-21" ng-style="{'color':wallet.color}"></i> <i class="icon ion-briefcase size-21" ng-style="{'color':wallet.color}"></i>
<span>{{wallet.name || wallet.id}}</span> <span>{{wallet.name || wallet.id}}</span>
<span class="item-note" ng-show="wallet.n > 1 && wallet.isComplete()"> <span class="item-note m10l" ng-show="wallet.n > 1 && wallet.isComplete()">
{{wallet.m}}-of-{{wallet.n}} {{wallet.m}}-of-{{wallet.n}}
</span> </span>
<span class="badge badge-assertive" ng-show="!wallet.isComplete()" translate> <span class="badge badge-assertive" ng-show="!wallet.isComplete()" translate>

View file

@ -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() { this.createTx = function() {
self.errorInfo = null; self.errorInfo = null;

View file

@ -889,7 +889,7 @@ input[type=file] {
} }
.wallets { .wallets {
height: 90px; height: 110px;
} }
.bar .button.back-button { .bar .button.back-button {

View file

@ -21,10 +21,6 @@
&.swiper-slide-next{ &.swiper-slide-next{
left:4%; left:4%;
} }
span{
float:right;
clear:both;
}
} }
} }
.swiper-pagination{ .swiper-pagination{