Cleanup form display a bit, for App Settings
This commit is contained in:
parent
1463c09385
commit
80589cde2f
|
@ -88,7 +88,9 @@
|
||||||
</header>
|
</header>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div v-for="setting in group.settings"
|
<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">
|
<div v-if="setting.error" class="field-error">
|
||||||
<span v-for="msg in setting.error_messages"
|
<span v-for="msg in setting.error_messages"
|
||||||
|
@ -97,16 +99,18 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field-row">
|
<div style="margin-bottom: 2rem;">
|
||||||
<label :for="setting.field_name">{{ setting.label }}</label>
|
|
||||||
<div class="field">
|
|
||||||
|
|
||||||
<input v-if="setting.data_type == 'bool'"
|
<b-field horizontal
|
||||||
type="checkbox"
|
:label="setting.label">
|
||||||
:name="setting.field_name"
|
|
||||||
:id="setting.field_name"
|
<b-checkbox v-if="setting.data_type == 'bool'"
|
||||||
v-model="setting.value"
|
:name="setting.field_name"
|
||||||
value="true" />
|
:id="setting.field_name"
|
||||||
|
v-model="setting.value"
|
||||||
|
native-value="true">
|
||||||
|
{{ setting.value || false }}
|
||||||
|
</b-checkbox>
|
||||||
|
|
||||||
<b-input v-else-if="setting.data_type == 'list'"
|
<b-input v-else-if="setting.data_type == 'list'"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
@ -128,14 +132,15 @@
|
||||||
:name="setting.field_name"
|
:name="setting.field_name"
|
||||||
:id="setting.field_name"
|
:id="setting.field_name"
|
||||||
v-model="setting.value" />
|
v-model="setting.value" />
|
||||||
</div>
|
|
||||||
|
</b-field>
|
||||||
|
|
||||||
|
<span v-if="setting.helptext" class="instructions">
|
||||||
|
{{ setting.helptext }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span v-if="setting.helptext" class="instructions">
|
</div>
|
||||||
{{ setting.helptext }}
|
|
||||||
</span>
|
|
||||||
|
|
||||||
</div><!-- field-wrapper -->
|
|
||||||
</div><!-- card-content -->
|
</div><!-- card-content -->
|
||||||
</div><!-- card -->
|
</div><!-- card -->
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue