From ebb73c8782de61e2a1d211be8138bec891261266 Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Fri, 14 Jun 2019 17:18:09 -0300 Subject: [PATCH] Add placeholder for new contributions --- webapp/components/ContributionForm/index.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/webapp/components/ContributionForm/index.vue b/webapp/components/ContributionForm/index.vue index f6bd9d38c..dd55dd8c6 100644 --- a/webapp/components/ContributionForm/index.vue +++ b/webapp/components/ContributionForm/index.vue @@ -15,7 +15,7 @@ model="language" :options="form.languageOptions" icon="globe" - :placeholder="form.placeholder" + :placeholder="locale" :label="$t('contribution.languageSelectLabel')" /> @@ -64,7 +64,6 @@ export default { content: '', language: null, languageOptions: [], - placeholder: '', }, formSchema: { title: { required: true, min: 3, max: 64 }, @@ -89,15 +88,15 @@ export default { this.form.content = contribution.content this.form.title = contribution.title this.form.language = this.locale - this.form.placeholder = this.locale }, }, }, computed: { locale() { - const locale = this.contribution.language - ? locales.find(loc => this.contribution.language === loc.code) - : locales.find(loc => this.$i18n.locale() === loc.code) + const locale = + this.contribution && this.contribution.language + ? locales.find(loc => this.contribution.language === loc.code) + : locales.find(loc => this.$i18n.locale() === loc.code) return locale.name }, },