Cleanup form display a bit, for App Settings

This commit is contained in:
Lance Edgar 2021-10-13 17:29:41 -04:00
parent 1463c09385
commit 80589cde2f

View file

@ -88,7 +88,9 @@
</header>
<div class="card-content">
<div v-for="setting in group.settings"
:class="'field-wrapper' + (setting.error ? ' with-error' : '')">
## TODO: not sure how the error handling looks now?
## :class="'field-wrapper' + (setting.error ? ' with-error' : '')"
>
<div v-if="setting.error" class="field-error">
<span v-for="msg in setting.error_messages"
@ -97,16 +99,18 @@
</span>
</div>
<div class="field-row">
<label :for="setting.field_name">{{ setting.label }}</label>
<div class="field">
<div style="margin-bottom: 2rem;">
<input v-if="setting.data_type == 'bool'"
type="checkbox"
<b-field horizontal
:label="setting.label">
<b-checkbox v-if="setting.data_type == 'bool'"
:name="setting.field_name"
:id="setting.field_name"
v-model="setting.value"
value="true" />
native-value="true">
{{ setting.value || false }}
</b-checkbox>
<b-input v-else-if="setting.data_type == 'list'"
type="textarea"
@ -128,14 +132,15 @@
:name="setting.field_name"
:id="setting.field_name"
v-model="setting.value" />
</div>
</div>
</b-field>
<span v-if="setting.helptext" class="instructions">
{{ setting.helptext }}
</span>
</div>
</div><!-- field-wrapper -->
</div>
</div><!-- card-content -->
</div><!-- card -->