Allow decimal input in credit field
This commit is contained in:
@@ -24,7 +24,7 @@ let credit_form = {
|
||||
}, {
|
||||
name: "credit",
|
||||
label: "Credit",
|
||||
type: "number",
|
||||
type: "decimal",
|
||||
default_value: 0,
|
||||
},
|
||||
],
|
||||
|
@@ -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}"
|
||||
|
Reference in New Issue
Block a user