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>
|
<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">
|
<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" />
|
<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>
|
<small class="text-muted">{{ specs.description }}</small>
|
||||||
</p>
|
</p>
|
||||||
</b-col>
|
</b-col>
|
||||||
|
@ -47,6 +47,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'HResourceValueInput',
|
name: 'HResourceValueInput',
|
||||||
|
|
||||||
|
@ -91,7 +93,9 @@ export default {
|
||||||
set (val) {
|
set (val) {
|
||||||
this.$emit('input', val)
|
this.$emit('input', val)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
|
...mapGetters('user', ['user_getSettings'])
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -221,6 +221,13 @@
|
||||||
"update": "Update service"
|
"update": "Update service"
|
||||||
},
|
},
|
||||||
"settings": {
|
"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",
|
"language": "Language",
|
||||||
"save": "Save settings",
|
"save": "Save settings",
|
||||||
"title": "Settings",
|
"title": "Settings",
|
||||||
|
|
|
@ -45,6 +45,16 @@
|
||||||
>
|
>
|
||||||
<b-form-select id="language-select" v-model="settings.language" :options="languages" />
|
<b-form-select id="language-select" v-model="settings.language" :options="languages" />
|
||||||
</b-form-group>
|
</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">
|
<div class="d-flex justify-content-around">
|
||||||
<b-button type="submit" variant="primary">
|
<b-button type="submit" variant="primary">
|
||||||
{{ $t('settings.save') }}
|
{{ $t('settings.save') }}
|
||||||
|
|
|
@ -35,5 +35,6 @@ import ()
|
||||||
|
|
||||||
// UserSettings represents the settings for an account.
|
// UserSettings represents the settings for an account.
|
||||||
type UserSettings struct {
|
type UserSettings struct {
|
||||||
Language string `json:"language,omitempty"`
|
Language string `json:"language,omitempty"`
|
||||||
|
FieldHint int `json:"fieldhint"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user