small fixes
This commit is contained in:
parent
c556eece8e
commit
70450a8774
2 changed files with 6 additions and 5 deletions
|
|
@ -79,7 +79,7 @@
|
||||||
<div id="iban" class="field">
|
<div id="iban" class="field">
|
||||||
<label for="input-iban" class="label">Receiver IBAN</label>
|
<label for="input-iban" class="label">Receiver IBAN</label>
|
||||||
<div class="control has-icons-right">
|
<div class="control has-icons-right">
|
||||||
<input id="input-iban" class="input" type="text" placeholder="Receiver IBAN" value="" required>
|
<input id="input-iban" class="input" type="text" value="" required>
|
||||||
<span class="icon is-small is-right"></span>
|
<span class="icon is-small is-right"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
<div id="bic" class="field">
|
<div id="bic" class="field">
|
||||||
<label for="input-bic" class="label">Receiver BIC</label>
|
<label for="input-bic" class="label">Receiver BIC</label>
|
||||||
<div class="control has-icons-right">
|
<div class="control has-icons-right">
|
||||||
<input id="input-bic" class="input" type="text" placeholder="Receiver BIC" value="" required>
|
<input id="input-bic" class="input" type="text" value="" required>
|
||||||
<span class="icon is-small is-right"></span>
|
<span class="icon is-small is-right"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -95,7 +95,7 @@
|
||||||
<div id="amount" class="field">
|
<div id="amount" class="field">
|
||||||
<label for="input-amount" class="label">Amount</label>
|
<label for="input-amount" class="label">Amount</label>
|
||||||
<div class="control has-icons-left has-icons-right">
|
<div class="control has-icons-left has-icons-right">
|
||||||
<input id="input-amount" class="input" type="number" min="0.00" step="0.01" value="0.00" pattern="[0-9]+.[0-9]{2}" required>
|
<input id="input-amount" class="input" type="number" min="0.00" step="0.01" value="0.00" pattern="[0-9]+.[0-9]{2}" placeholder="0.00" required>
|
||||||
<span class="icon is-small is-left"><b>€</b></span>
|
<span class="icon is-small is-left"><b>€</b></span>
|
||||||
<span class="icon is-small is-right"></span>
|
<span class="icon is-small is-right"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
<div id="purpose" class="field">
|
<div id="purpose" class="field">
|
||||||
<label for="input-purpose" class="label">Purpose</label>
|
<label for="input-purpose" class="label">Purpose</label>
|
||||||
<div class="control has-icons-right">
|
<div class="control has-icons-right">
|
||||||
<input id="input-purpose" class="input" type="text" placeholder="Purpose" value="" maxlength="140" required>
|
<input id="input-purpose" class="input" type="text" placeholder="Pizza night!" value="" maxlength="140" required>
|
||||||
<span class="icon is-small is-right"></span>
|
<span class="icon is-small is-right"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,8 @@ validateIban = (target) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
validateAmount = (target) => {
|
validateAmount = (target) => {
|
||||||
if (parseFloat(target.value) > 0) {
|
if (parseFloat(target.value) > 0 && target.value.toString() === parseFloat(target.value).toFixed(2).toString()) {
|
||||||
|
target.value = parseFloat(target.value).toFixed(2);
|
||||||
target.classList.remove("is-danger")
|
target.classList.remove("is-danger")
|
||||||
document.querySelector("#amount div span.is-right").innerHTML = "✅";
|
document.querySelector("#amount div span.is-right").innerHTML = "✅";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue