Allow only dots to separate decimals

This commit is contained in:
Gustavo Maximiliano Cortez 2015-08-13 12:59:19 -03:00
commit cebd8fe06e
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
3 changed files with 10 additions and 44 deletions

View file

@ -53,9 +53,9 @@
<span translate>Amount</span>
</label>
<div class="input">
<input type="text" id="amount" name="amount" ng-attr-placeholder="{{'Amount'|translate}}"
ng-model="_customAmount" valid-amount required autocomplete="off" pattern="[0-9]+([\.,][0-9]+)*">
<input type="text" id="alternative" name="alternative" ng-model="_customAlternative" style="display:none">
<input type="number" id="amount" name="amount" ng-attr-placeholder="{{'Amount'|translate}}"
ng-model="_customAmount" valid-amount required autocomplete="off">
<input type="number" id="alternative" name="alternative" ng-model="_customAlternative" style="display:none">
<a class="postfix" ng-click="toggleAlternative()">{{unitName}}</a>
</div>
</div>
@ -63,9 +63,9 @@
<label for="alternative"><span translate>Amount in</span> {{ alternativeName }}
</label>
<div class="input">
<input type="text" id="alternative" name="alternative" ng-attr-placeholder="{{'Amount'|translate}}"
ng-model="_customAlternative" valid-alternative required autocomplete="off" pattern="[0-9]+([\.,][0-9]+)*" required>
<input type="text" id="amount" name="amount" ng-model="_customAmount" style="display:none">
<input type="number" id="alternative" name="alternative" ng-attr-placeholder="{{'Amount'|translate}}"
ng-model="_customAlternative" required autocomplete="off" required>
<input type="number" id="amount" name="amount" ng-model="_customAmount" style="display:none">
<a class="postfix" ng-click="toggleAlternative()"> {{ alternativeIsoCode }}</a>
</div>
</div>