Cleanup form display a bit, for App Settings
This commit is contained in:
parent
1463c09385
commit
80589cde2f
|
@ -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"
|
||||
:name="setting.field_name"
|
||||
:id="setting.field_name"
|
||||
v-model="setting.value"
|
||||
value="true" />
|
||||
<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"
|
||||
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>
|
||||
|
||||
</b-field>
|
||||
|
||||
<span v-if="setting.helptext" class="instructions">
|
||||
{{ setting.helptext }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span v-if="setting.helptext" class="instructions">
|
||||
{{ setting.helptext }}
|
||||
</span>
|
||||
|
||||
</div><!-- field-wrapper -->
|
||||
</div>
|
||||
</div><!-- card-content -->
|
||||
</div><!-- card -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue