mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #4669 from cmgustavo/bug/input-amount-lock-wp
Fix input-amount for WP. Read-only input (mobile)
This commit is contained in:
commit
daf45d48a8
|
@ -420,12 +420,58 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<div ng-if="index.isCordova">
|
<div ng-if="index.isCordova">
|
||||||
<input type="amount" readonly="true" ng-show="!showAlternative" id="amount" ng-disabled="home.lockAmount" name="amount" ng-attr-placeholder="{{'Amount in'|translate}} {{home.unitName}}" ng-model="_amount" valid-amount required autocomplete="off" ng-focus="openInputAmountModal()" ignore-mouse-wheel>
|
<input
|
||||||
<input type="amount" readonly="true" ng-show="showAlternative" id="alternative" ng-disabled="!home.isRateAvailable || home.lockAmount" name="alternative" ng-attr-placeholder="{{'Amount in'|translate}} {{ home.alternativeName }}" ng-model="_alternative" required autocomplete="off" ng-focus="openInputAmountModal()" ignore-mouse-wheel>
|
type="number"
|
||||||
|
readonly="true"
|
||||||
|
ng-show="!showAlternative"
|
||||||
|
id="amount"
|
||||||
|
ng-disabled="home.lockAmount"
|
||||||
|
name="amount"
|
||||||
|
ng-attr-placeholder="{{'Amount in'|translate}} {{home.unitName}}"
|
||||||
|
ng-model="_amount"
|
||||||
|
valid-amount
|
||||||
|
required
|
||||||
|
autocomplete="off"
|
||||||
|
ng-click="openInputAmountModal()"
|
||||||
|
ignore-mouse-wheel>
|
||||||
|
<input
|
||||||
|
type="number"
|
||||||
|
readonly="true"
|
||||||
|
ng-show="showAlternative"
|
||||||
|
id="alternative"
|
||||||
|
ng-disabled="!home.isRateAvailable || home.lockAmount"
|
||||||
|
name="alternative"
|
||||||
|
ng-attr-placeholder="{{'Amount in'|translate}} {{ home.alternativeName }}"
|
||||||
|
ng-model="_alternative"
|
||||||
|
required
|
||||||
|
autocomplete="off"
|
||||||
|
ng-click="openInputAmountModal()"
|
||||||
|
ignore-mouse-wheel>
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="!index.isCordova">
|
<div ng-if="!index.isCordova">
|
||||||
<input type="number" ng-show="!showAlternative" id="amount" ng-disabled="home.lockAmount" name="amount" ng-attr-placeholder="{{'Amount in'|translate}} {{home.unitName}}" ng-model="_amount" valid-amount required autocomplete="off" ignore-mouse-wheel>
|
<input
|
||||||
<input type="number" ng-show="showAlternative" id="alternative" ng-disabled="!home.isRateAvailable || home.lockAmount" name="alternative" ng-attr-placeholder="{{'Amount in'|translate}} {{ home.alternativeName }}" ng-model="_alternative" required autocomplete="off" ignore-mouse-wheel>
|
type="number"
|
||||||
|
ng-show="!showAlternative"
|
||||||
|
id="amount"
|
||||||
|
ng-disabled="home.lockAmount"
|
||||||
|
name="amount"
|
||||||
|
ng-attr-placeholder="{{'Amount in'|translate}} {{home.unitName}}"
|
||||||
|
ng-model="_amount"
|
||||||
|
valid-amount
|
||||||
|
required
|
||||||
|
autocomplete="off"
|
||||||
|
ignore-mouse-wheel>
|
||||||
|
<input
|
||||||
|
type="number"
|
||||||
|
ng-show="showAlternative"
|
||||||
|
id="alternative"
|
||||||
|
ng-disabled="!home.isRateAvailable || home.lockAmount"
|
||||||
|
name="alternative"
|
||||||
|
ng-attr-placeholder="{{'Amount in'|translate}} {{ home.alternativeName }}"
|
||||||
|
ng-model="_alternative"
|
||||||
|
required
|
||||||
|
autocomplete="off"
|
||||||
|
ignore-mouse-wheel>
|
||||||
</div>
|
</div>
|
||||||
<a class="postfix button" ng-show="!showAlternative" ng-style="{'background-color':index.backgroundColor}" ng-click="showAlternative = !showAlternative">{{home.unitName}}</a>
|
<a class="postfix button" ng-show="!showAlternative" ng-style="{'background-color':index.backgroundColor}" ng-click="showAlternative = !showAlternative">{{home.unitName}}</a>
|
||||||
<a class="postfix button black" ng-show="showAlternative" ng-click="showAlternative = !showAlternative">{{home.alternativeIsoCode}}</a>
|
<a class="postfix button black" ng-show="showAlternative" ng-click="showAlternative = !showAlternative">{{home.alternativeIsoCode}}</a>
|
||||||
|
|
|
@ -610,7 +610,6 @@ 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();
|
||||||
if (!this.fromInputAmount)
|
|
||||||
this.lockAmount = true;
|
this.lockAmount = true;
|
||||||
this.fromInputAmount = false;
|
this.fromInputAmount = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,28 +44,6 @@ textarea:focus {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="amount"] {
|
|
||||||
&[readonly] {
|
|
||||||
width: 100%;
|
|
||||||
opacity: 1;
|
|
||||||
color: #B7C2CD;
|
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
height: 35px;
|
|
||||||
background: transparent;
|
|
||||||
border: none;
|
|
||||||
padding-left: 0.1rem;
|
|
||||||
font-size: 13px;
|
|
||||||
border-bottom: 1px solid #E9EDF0;
|
|
||||||
cursor: text;
|
|
||||||
},
|
|
||||||
&[disabled] {
|
|
||||||
background-color: #E4E8EC;
|
|
||||||
color: #2C3E50;
|
|
||||||
padding-left: 0.5rem;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="text"] {
|
input[type="text"] {
|
||||||
&[disabled], &[readonly] {
|
&[disabled], &[readonly] {
|
||||||
background-color: #E4E8EC;
|
background-color: #E4E8EC;
|
||||||
|
|
Loading…
Reference in New Issue