Fix input-amount for WP. Lock-amount by default

This commit is contained in:
Gustavo Maximiliano Cortez 2016-08-09 20:22:45 -03:00
commit e7e9de6adb
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
3 changed files with 51 additions and 28 deletions

View file

@ -420,12 +420,58 @@
</label>
<div class="input">
<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 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>
<input
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 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 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>
<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
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>
<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>