New option to choose fieldhint
This commit is contained in:
parent
d6b300fccc
commit
12eb6c45be
|
@ -39,7 +39,7 @@
|
|||
<label v-else :for="'spec-' + index + '-' + specs.id" :title="specs.label" class="col-md-4 col-form-label text-truncate text-md-right text-primary">{{ specs.id }}</label>
|
||||
<b-col md="8">
|
||||
<h-resource-value-input-raw v-model="val" :edit="edit" :index="index" :specs="specs" @focus="show_description = true" @blur="show_description = false" />
|
||||
<p v-if="specs.description" v-show="show_description" class="text-justify" style="line-height: 1.1">
|
||||
<p v-if="specs.description" v-show="user_getSettings.fieldhint > 2 || (user_getSettings.fieldhint > 1 && show_description)" class="text-justify" style="line-height: 1.1">
|
||||
<small class="text-muted">{{ specs.description }}</small>
|
||||
</p>
|
||||
</b-col>
|
||||
|
@ -47,6 +47,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'HResourceValueInput',
|
||||
|
||||
|
@ -91,7 +93,9 @@ export default {
|
|||
set (val) {
|
||||
this.$emit('input', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
...mapGetters('user', ['user_getSettings'])
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
|
@ -221,6 +221,13 @@
|
|||
"update": "Update service"
|
||||
},
|
||||
"settings": {
|
||||
"fieldhint": {
|
||||
"title": "Display hint for form fields",
|
||||
"hide": "Hide",
|
||||
"tooltip": "Tooltip near field",
|
||||
"focused": "Under field when focused",
|
||||
"always": "Under field, always"
|
||||
},
|
||||
"language": "Language",
|
||||
"save": "Save settings",
|
||||
"title": "Settings",
|
||||
|
|
|
@ -45,6 +45,16 @@
|
|||
>
|
||||
<b-form-select id="language-select" v-model="settings.language" :options="languages" />
|
||||
</b-form-group>
|
||||
<b-form-group
|
||||
:label="$t('settings.fieldhint.title')"
|
||||
label-for="fieldhint-select"
|
||||
>
|
||||
<b-form-select
|
||||
id="fieldhint-select"
|
||||
v-model="settings.fieldhint"
|
||||
:options="[{value: 0, text: $t('settings.fieldhint.hide')}, {value: 1, text: $t('settings.fieldhint.tooltip')}, {value: 2, text: $t('settings.fieldhint.focused')}, {value: 3, text: $t('settings.fieldhint.always')}]"
|
||||
/>
|
||||
</b-form-group>
|
||||
<div class="d-flex justify-content-around">
|
||||
<b-button type="submit" variant="primary">
|
||||
{{ $t('settings.save') }}
|
||||
|
|
|
@ -36,4 +36,5 @@ import ()
|
|||
// UserSettings represents the settings for an account.
|
||||
type UserSettings struct {
|
||||
Language string `json:"language,omitempty"`
|
||||
FieldHint int `json:"fieldhint"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user