From cb356161e553a6dca377f7c3c65b70c51a895a4c Mon Sep 17 00:00:00 2001 From: senderfm Date: Thu, 4 Jul 2019 16:53:56 +0200 Subject: [PATCH 01/62] HcContributionForm submit is disabled by default --- webapp/components/ContributionForm/ContributionForm.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index c6bb2cdc4..cb56432b8 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -92,7 +92,7 @@ export default { }, id: null, loading: false, - disabled: false, + disabled: true, slug: null, users: [], } @@ -169,6 +169,11 @@ export default { }, updateEditorContent(value) { // this.form.content = value + this.disabled = true + if (value.replace(/

|<\/p>|

|<\/h3>|

|<\/h4>/gm, '').length > 3) { + this.disabled = false + } + this.$refs.contributionForm.update('content', value) }, availableLocales() { From 23cf309cfc1c7803f9366adc931857e49994f1c3 Mon Sep 17 00:00:00 2001 From: senderfm Date: Thu, 4 Jul 2019 17:14:02 +0200 Subject: [PATCH 02/62] HcContributionForm submit is disabled by default replace all editor html tags --- webapp/components/ContributionForm/ContributionForm.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index cb56432b8..c91ed9741 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -170,7 +170,12 @@ export default { updateEditorContent(value) { // this.form.content = value this.disabled = true - if (value.replace(/

|<\/p>|

|<\/h3>|

|<\/h4>/gm, '').length > 3) { + if ( + value.replace( + /

|<\/p>|

|<\/h3>|

|<\/h4>|