Allow decimal input in credit field

This commit is contained in:
2021-11-16 15:18:28 +01:00
parent 7845753b27
commit 85975bc7ea
2 changed files with 9 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ let credit_form = {
}, {
name: "credit",
label: "Credit",
type: "number",
type: "decimal",
default_value: 0,
},
],

View File

@@ -162,6 +162,14 @@ let handle_errors = (response) => {
value="{field.default_value}"
type="number"
class="form_input"/>
{:else if field.type === "decimal"}
<input bind:this={field.binding}
id="input_{field.name}"
name="{field.name}"
value="{field.default_value}"
type="number"
step="0.1"
class="form_input"/>
{:else if field.type === "username"}
<input bind:this={field.binding}
id="input_{field.name}"