Fix event title length limitation

Closes #167

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-09-23 11:51:59 +02:00
parent 0af855fdb8
commit 130f24dc0b
3 changed files with 8 additions and 2 deletions

View File

@@ -17,8 +17,8 @@ import {EventJoinOptions} from "@/types/event.model";
</h2>
<picture-upload v-model="pictureFile" />
<b-field :label="$t('Title')">
<b-input aria-required="true" required v-model="event.title" maxlength="64" />
<b-field :label="$t('Title')" :type="checkTitleLength[0]" :message="checkTitleLength[1]">
<b-input aria-required="true" required v-model="event.title" />
</b-field>
<tag-input v-model="event.tags" :data="tags" path="title" />
@@ -339,6 +339,10 @@ export default class EditEvent extends Vue {
}
}
get checkTitleLength() {
return this.event.title.length > 80 ? ['is-info', this.$t('The event title will be ellipsed.')] : [undefined, undefined];
}
// getAddressData(addressData) {
// if (addressData !== null) {
// this.event.address = {