chore: The label creation UI input is transform to lowercase (#6712)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<woot-input
|
||||
v-model.trim="title"
|
||||
:class="{ error: $v.title.$error }"
|
||||
class="medium-12 columns"
|
||||
class="medium-12 columns label-name--input"
|
||||
:label="$t('LABEL_MGMT.FORM.NAME.LABEL')"
|
||||
:placeholder="$t('LABEL_MGMT.FORM.NAME.PLACEHOLDER')"
|
||||
:error="getLabelTitleErrorMessage"
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
await this.$store.dispatch('labels/create', {
|
||||
color: this.color,
|
||||
description: this.description,
|
||||
title: this.title,
|
||||
title: this.title.toLowerCase(),
|
||||
show_on_sidebar: this.showOnSidebar,
|
||||
});
|
||||
this.showAlert(this.$t('LABEL_MGMT.ADD.API.SUCCESS_MESSAGE'));
|
||||
@@ -105,3 +105,13 @@ export default {
|
||||
},
|
||||
};
|
||||
</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
|
||||
v-model.trim="title"
|
||||
:class="{ error: $v.title.$error }"
|
||||
class="medium-12 columns"
|
||||
class="medium-12 columns label-name--input"
|
||||
:label="$t('LABEL_MGMT.FORM.NAME.LABEL')"
|
||||
:placeholder="$t('LABEL_MGMT.FORM.NAME.PLACEHOLDER')"
|
||||
:error="getLabelTitleErrorMessage"
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
id: this.selectedResponse.id,
|
||||
color: this.color,
|
||||
description: this.description,
|
||||
title: this.title,
|
||||
title: this.title.toLowerCase(),
|
||||
show_on_sidebar: this.showOnSidebar,
|
||||
})
|
||||
.then(() => {
|
||||
@@ -115,3 +115,13 @@ export default {
|
||||
},
|
||||
};
|
||||
</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