1
0
Fork 0
mirror of synced 2024-06-01 18:39:57 +12:00

fix: ui for int/float default values

This commit is contained in:
Torsten Dittmann 2022-01-17 11:47:22 +01:00
parent 2f5c958f22
commit 96828f739e
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