chore: The label creation UI input is transform to lowercase (#6712)
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
<woot-input
|
<woot-input
|
||||||
v-model.trim="title"
|
v-model.trim="title"
|
||||||
:class="{ error: $v.title.$error }"
|
:class="{ error: $v.title.$error }"
|
||||||
class="medium-12 columns"
|
class="medium-12 columns label-name--input"
|
||||||
:label="$t('LABEL_MGMT.FORM.NAME.LABEL')"
|
:label="$t('LABEL_MGMT.FORM.NAME.LABEL')"
|
||||||
:placeholder="$t('LABEL_MGMT.FORM.NAME.PLACEHOLDER')"
|
:placeholder="$t('LABEL_MGMT.FORM.NAME.PLACEHOLDER')"
|
||||||
:error="getLabelTitleErrorMessage"
|
:error="getLabelTitleErrorMessage"
|
||||||
@@ -91,7 +91,7 @@ export default {
|
|||||||
await this.$store.dispatch('labels/create', {
|
await this.$store.dispatch('labels/create', {
|
||||||
color: this.color,
|
color: this.color,
|
||||||
description: this.description,
|
description: this.description,
|
||||||
title: this.title,
|
title: this.title.toLowerCase(),
|
||||||
show_on_sidebar: this.showOnSidebar,
|
show_on_sidebar: this.showOnSidebar,
|
||||||
});
|
});
|
||||||
this.showAlert(this.$t('LABEL_MGMT.ADD.API.SUCCESS_MESSAGE'));
|
this.showAlert(this.$t('LABEL_MGMT.ADD.API.SUCCESS_MESSAGE'));
|
||||||
@@ -105,3 +105,13 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
// Label API supports only lowercase letters
|
||||||
|
.label-name--input {
|
||||||
|
::v-deep {
|
||||||
|
input {
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<woot-input
|
<woot-input
|
||||||
v-model.trim="title"
|
v-model.trim="title"
|
||||||
:class="{ error: $v.title.$error }"
|
:class="{ error: $v.title.$error }"
|
||||||
class="medium-12 columns"
|
class="medium-12 columns label-name--input"
|
||||||
:label="$t('LABEL_MGMT.FORM.NAME.LABEL')"
|
:label="$t('LABEL_MGMT.FORM.NAME.LABEL')"
|
||||||
:placeholder="$t('LABEL_MGMT.FORM.NAME.PLACEHOLDER')"
|
:placeholder="$t('LABEL_MGMT.FORM.NAME.PLACEHOLDER')"
|
||||||
:error="getLabelTitleErrorMessage"
|
:error="getLabelTitleErrorMessage"
|
||||||
@@ -101,7 +101,7 @@ export default {
|
|||||||
id: this.selectedResponse.id,
|
id: this.selectedResponse.id,
|
||||||
color: this.color,
|
color: this.color,
|
||||||
description: this.description,
|
description: this.description,
|
||||||
title: this.title,
|
title: this.title.toLowerCase(),
|
||||||
show_on_sidebar: this.showOnSidebar,
|
show_on_sidebar: this.showOnSidebar,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -115,3 +115,13 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
// Label API supports only lowercase letters
|
||||||
|
.label-name--input {
|
||||||
|
::v-deep {
|
||||||
|
input {
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user