Merge pull request #4675 from cmgustavo/bug/calc-disable-paypro
Calculator: Fix paypro. disable input
This commit is contained in:
commit
8460eede78
2 changed files with 10 additions and 5 deletions
|
|
@ -422,9 +422,10 @@
|
||||||
<div ng-if="index.isCordova">
|
<div ng-if="index.isCordova">
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
readonly="true"
|
ng-readonly="!home.lockAmount"
|
||||||
ng-show="!showAlternative"
|
ng-show="!showAlternative"
|
||||||
id="amount"
|
id="amount"
|
||||||
|
ng-disabled="home.lockAmount"
|
||||||
name="amount"
|
name="amount"
|
||||||
ng-attr-placeholder="{{'Amount in'|translate}} {{home.unitName}}"
|
ng-attr-placeholder="{{'Amount in'|translate}} {{home.unitName}}"
|
||||||
ng-model="_amount"
|
ng-model="_amount"
|
||||||
|
|
@ -435,9 +436,10 @@
|
||||||
ignore-mouse-wheel>
|
ignore-mouse-wheel>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
readonly="true"
|
ng-readonly="!home.lockAmount"
|
||||||
ng-show="showAlternative"
|
ng-show="showAlternative"
|
||||||
id="alternative"
|
id="alternative"
|
||||||
|
ng-disabled="!home.isRateAvailable || home.lockAmount"
|
||||||
name="alternative"
|
name="alternative"
|
||||||
ng-attr-placeholder="{{'Amount in'|translate}} {{ home.alternativeName }}"
|
ng-attr-placeholder="{{'Amount in'|translate}} {{ home.alternativeName }}"
|
||||||
ng-model="_alternative"
|
ng-model="_alternative"
|
||||||
|
|
@ -492,10 +494,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="large-6 medium-6 small-6 columns" ng-show="(home._paypro || home.lockAddress || home.lockAmount)">
|
<div class="large-6 medium-6 small-6 columns" ng-show="(home._paypro || home.lockAddress ||
|
||||||
|
home.lockAmount || !sendForm.amount.$pristine)">
|
||||||
<a ng-click="home.resetForm(sendForm)" class="button expand outline dark-gray round" translate>Cancel</a>
|
<a ng-click="home.resetForm(sendForm)" class="button expand outline dark-gray round" translate>Cancel</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="columns" ng-class="{'small-6 medium-6 large-6':(home._paypro || home.lockAddress || home.lockAmount)}">
|
<div class="columns" ng-class="{'small-6 medium-6 large-6':(home._paypro || home.lockAddress ||
|
||||||
|
home.lockAmount || !sendForm.amount.$pristine)}">
|
||||||
<button class="button black round expand" ng-disabled="sendForm.$invalid || home.paymentExpired || index.updating"
|
<button class="button black round expand" ng-disabled="sendForm.$invalid || home.paymentExpired || index.updating"
|
||||||
ng-style="{'background-color':index.backgroundColor}" ng-click="home.submitForm()" translate>
|
ng-style="{'background-color':index.backgroundColor}" ng-click="home.submitForm()" translate>
|
||||||
Send
|
Send
|
||||||
|
|
|
||||||
|
|
@ -620,7 +620,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
form.amount.$setViewValue("" + amount);
|
form.amount.$setViewValue("" + amount);
|
||||||
form.amount.$isValid = true;
|
form.amount.$isValid = true;
|
||||||
form.amount.$render();
|
form.amount.$render();
|
||||||
this.lockAmount = true;
|
if (!this.fromInputAmount)
|
||||||
|
this.lockAmount = true;
|
||||||
this.fromInputAmount = false;
|
this.fromInputAmount = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue