diff --git a/.meteor/packages b/.meteor/packages index ef5326118a..9a715c698b 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -84,3 +84,4 @@ useraccounts:core useraccounts:flow-routing vsivsi:file-collection zimme:active-route +aramk:quill diff --git a/.meteor/versions b/.meteor/versions index 26d03910dc..8ec38d7a57 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -20,6 +20,7 @@ apinf:autoform-bs-datepicker@1.1.2 apinf:create-role-if-undefined@0.1.1 apinf:first-admin@0.1.2 apinf:restivus-swagger@0.2.1 +aramk:quill@0.1.1 arillo:flow-router-helpers@0.5.2 autoupdate@1.3.12 babel-compiler@6.13.0 @@ -152,6 +153,7 @@ templating-tools@1.0.5 tmeasday:publish-counts@0.8.0 todda00:friendly-slugs@0.6.0 tracker@1.1.1 +trever:quill@0.0.5 twbs:bootstrap@3.3.6 u2622:persistent-session@0.4.4 ui@1.0.12 diff --git a/branding/client/autoform.js b/branding/client/autoform.js new file mode 100644 index 0000000000..4bbf74e93c --- /dev/null +++ b/branding/client/autoform.js @@ -0,0 +1,25 @@ +import { AutoForm } from 'meteor/aldeed:autoform'; +import Branding from '/branding/collection'; + +AutoForm.hooks({ + brandingEdit: { + onSuccess () { + // Get termsOfUse + const termsOfUse = this.currentDoc.termsOfUse; + + // Get privacyPolicy + const privacyPolicy = this.currentDoc.termsOfUse; + + // If editor is empty (has only this empty div) + // see https://github.com/quilljs/quill/issues/1235 + if (termsOfUse === '