Skip to content
Snippets Groups Projects
Commit cec6531b authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA :bicyclist:
Browse files

Merge branch 'redmine-issues/14567' into 'develop'

REDMINE_ISSUE-14567

See merge request !470
parents 7655fd95 2f9f96c6
No related branches found
No related tags found
No related merge requests found
<template> <template>
<div <div v-if="field && field.field_type === 'char'">
v-if="field && field.field_type === 'char'"
>
<label <label
v-if="$route.name === 'editer-signalement'" v-if="displayLabels"
:for="field.name" :for="field.name"
> >
{{ field.label }} {{ field.label }}
...@@ -17,11 +15,9 @@ ...@@ -17,11 +15,9 @@
> >
</div> </div>
<div <div v-else-if="field && field.field_type === 'list'">
v-else-if="field && field.field_type === 'list'"
>
<label <label
v-if="$route.name === 'editer-signalement'" v-if="displayLabels"
:for="field.name" :for="field.name"
> >
{{ field.label }} {{ field.label }}
...@@ -32,11 +28,9 @@ ...@@ -32,11 +28,9 @@
:selection.sync="selected_extra_form_list" :selection.sync="selected_extra_form_list"
/> />
</div> </div>
<div <div v-else-if="field && field.field_type === 'integer'">
v-else-if="field && field.field_type === 'integer'"
>
<label <label
v-if="$route.name === 'editer-signalement'" v-if="displayLabels"
:for="field.name" :for="field.name"
> >
{{ field.label }} {{ field.label }}
...@@ -52,9 +46,7 @@ ...@@ -52,9 +46,7 @@
> >
</div> </div>
</div> </div>
<div <div v-else-if="field && field.field_type === 'boolean'">
v-else-if="field && field.field_type === 'boolean'"
>
<div class="ui checkbox"> <div class="ui checkbox">
<input <input
:id="field.name" :id="field.name"
...@@ -64,15 +56,13 @@ ...@@ -64,15 +56,13 @@
@change="updateStore_extra_form" @change="updateStore_extra_form"
> >
<label :for="field.name"> <label :for="field.name">
{{ $route.name === 'editer-signalement' ? field.label : '' }} {{ displayLabels ? field.label : '' }}
</label> </label>
</div> </div>
</div> </div>
<div <div v-else-if="field && field.field_type === 'date'">
v-else-if="field && field.field_type === 'date'"
>
<label <label
v-if="$route.name === 'editer-signalement'" v-if="displayLabels"
:for="field.name" :for="field.name"
> >
{{ field.label }} {{ field.label }}
...@@ -85,11 +75,9 @@ ...@@ -85,11 +75,9 @@
@blur="updateStore_extra_form" @blur="updateStore_extra_form"
> >
</div> </div>
<div <div v-else-if="field && field.field_type === 'decimal'">
v-else-if="field && field.field_type === 'decimal'"
>
<label <label
v-if="$route.name === 'editer-signalement'" v-if="displayLabels"
:for="field.name" :for="field.name"
> >
{{ field.label }} {{ field.label }}
...@@ -105,11 +93,9 @@ ...@@ -105,11 +93,9 @@
> >
</div> </div>
</div> </div>
<div <div v-else-if="field && field.field_type === 'text'">
v-else-if="field && field.field_type === 'text'"
>
<label <label
v-if="$route.name === 'editer-signalement'" v-if="displayLabels"
:for="field.name" :for="field.name"
> >
{{ field.label }} {{ field.label }}
...@@ -152,6 +138,10 @@ export default { ...@@ -152,6 +138,10 @@ export default {
this.$store.commit('feature/UPDATE_EXTRA_FORM', newExtraForm); this.$store.commit('feature/UPDATE_EXTRA_FORM', newExtraForm);
}, },
}, },
displayLabels() {
return this.$route.name === 'editer-signalement' || this.$route.name === 'ajouter-signalement';
}
}, },
methods: { methods: {
......
...@@ -264,11 +264,11 @@ ...@@ -264,11 +264,11 @@
<div <div
v-for="(field, index) in orderedCustomFields" v-for="(field, index) in orderedCustomFields"
:key="field.field_type + index" :key="field.field_type + index"
class="field"
> >
<FeatureExtraForm <FeatureExtraForm
:id="field.label" :id="field.label"
:field="field" :field="field"
class="field"
/> />
{{ field.errors }} {{ field.errors }}
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment