1
0
Fork 0
mirror of synced 2024-06-13 16:24:47 +12:00

Merge pull request #2625 from appwrite/fix-ui-int-float-default-value

fix: ui for int/float default values
This commit is contained in:
Eldad A. Fux 2022-01-17 14:53:25 +02:00 committed by GitHub
commit 4064d3181f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -706,10 +706,10 @@ $logs = $this->getParam('logs', null);
<label for="integer-default">Default Value</label>
<template x-if="!(array || required)">
<input name="xdefault" type="number" class="margin-bottom-large" autocomplete="off">
<input name="xdefault" type="number" class="margin-bottom-large" autocomplete="off" data-cast-to="integer">
</template>
<template x-if="(array || required)">
<input name="xdefault" type="number" class="margin-bottom-large" autocomplete="off" disabled value="">
<input name="xdefault" type="number" class="margin-bottom-large" autocomplete="off" data-cast-to="integer" disabled>
</template>
<footer>
@ -770,10 +770,10 @@ $logs = $this->getParam('logs', null);
<label for="float-default">Default Value</label>
<template x-if="!(array || required)">
<input name="xdefault" type="number" step="0.01" class="margin-bottom-large" autocomplete="off">
<input name="xdefault" type="number" step="0.01" class="margin-bottom-large" autocomplete="off" data-cast-to="float">
</template>
<template x-if="(array || required)">
<input name="xdefault" type="number" step="0.01" class="margin-bottom-large" autocomplete="off" disabled value="">
<input name="xdefault" type="number" step="0.01" class="margin-bottom-large" autocomplete="off" data-cast-to="float" disabled>
</template>
<footer>

View file

@ -115,7 +115,7 @@ $logs = $this->getParam('logs', null);
:name="attr.key"
:required="attr.required"
x-model="doc[attr.key]"
data-cast-to="integer" />
data-cast-to="float" />
</template>
<template x-if="attr.type === 'boolean'">
<input
@ -205,7 +205,7 @@ $logs = $this->getParam('logs', null);
:name="attr.key"
:required="attr.required"
x-model="doc[attr.key][index]"
data-cast-to="integer" />
data-cast-to="float" />
</template>
<template x-if="attr.type === 'boolean'">
<input