-
Notifications
You must be signed in to change notification settings - Fork 33
Privacy & terms #2204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Privacy & terms #2204
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
50d0f07
Add new fields to the schema
a52c269
Add new fields to the branding page
fc9c93e
Add i18n
36b3530
Initial templates
65944dc
Routes
196bf96
Showing values on the pages; subscriptions; helpers
9890016
Merge branch 'develop' into feature/ui-pravicy-terms
a70ebfb
Add links to footer
8e6a3c1
Links on sign up page
c893761
Add quill npm
4ebf074
Remove npm
5ed4062
Add aramk:quill
975de41
Add quill to quick form fields
e447008
Include to related pages
d42fc8e
Check if policy and/or terms exist
d4a98ac
i18n
6d7a357
Check if editor is empty
4c48841
Unset if editors are empty
09f9e40
Change helpers
45a0406
Fix condition
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,3 +84,4 @@ useraccounts:core | |
| useraccounts:flow-routing | ||
| vsivsi:file-collection | ||
| zimme:active-route | ||
| aramk:quill | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <template name="privacyPolicy"> | ||
| {{# if branding.privacyPolicyExists }} | ||
| <div class="container"> | ||
| <h1>{{ branding.siteTitle }} {{_ "privacyPolicy_title" }}</h1> | ||
| {{{ branding.privacyPolicy }}} | ||
| </div> | ||
| {{ else }} | ||
| {{> notFound }} | ||
| {{/ if }} | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { Template } from 'meteor/templating'; | ||
| import Branding from '/branding/collection'; | ||
|
|
||
| Template.privacyPolicy.onCreated(function () { | ||
| // Get reference to template instance | ||
| const instance = this; | ||
|
|
||
| // Subscription to branding collection | ||
| instance.subscribe('branding'); | ||
| }); | ||
|
|
||
| Template.privacyPolicy.helpers({ | ||
| branding () { | ||
| // Get Branding collection content | ||
| return Branding.findOne(); | ||
| }, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <template name="termsOfUse"> | ||
| {{# if branding.termsOfUseExists }} | ||
| <div class="container"> | ||
| <h1>{{ branding.siteTitle }} {{_ "termsOfUse_title" }}</h1> | ||
| {{{ branding.termsOfUse }}} | ||
| </div> | ||
| {{ else }} | ||
| {{> notFound }} | ||
| {{/ if }} | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { Template } from 'meteor/templating'; | ||
| import Branding from '/branding/collection'; | ||
|
|
||
| Template.termsOfUse.onCreated(function () { | ||
| // Get reference to template instance | ||
| const instance = this; | ||
|
|
||
| // Subscription to branding collection | ||
| instance.subscribe('branding'); | ||
| }); | ||
|
|
||
| Template.termsOfUse.helpers({ | ||
| branding () { | ||
| // Get Branding collection content | ||
| return Branding.findOne(); | ||
| }, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import Branding from './'; | ||
|
|
||
| Branding.helpers({ | ||
| privacyPolicyExists () { | ||
| const privacyPolicy = this.privacyPolicy; | ||
|
|
||
| // If editor is empty (has only this empty div) | ||
| // see https://github.com/quilljs/quill/issues/1235 | ||
| if (privacyPolicy === '<div><br></div>') { | ||
| return false; | ||
| } | ||
| return true; | ||
| }, | ||
| termsOfUseExists () { | ||
| const termsOfUse = this.termsOfUse; | ||
|
|
||
| // If editor is empty (has only this empty div) | ||
| // see https://github.com/quilljs/quill/issues/1235 | ||
| if (termsOfUse === '<div><br></div>') { | ||
| return false; | ||
| } | ||
| return true; | ||
| }, | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than using a template helper to check for
<div><br></div>, lets try an AutoForm.onSubmit hook to look for that string. If theprivacyPolicy === '<div><br></div>', then set the field value to undefined.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For GitHub cross-reference, here is the Quill issue from this PR comment: slab/quill#1235