branch feature/210-rgpd created (now 0e09b8c2)
This is an automated email from the git hooks/post-receive script. New change to branch feature/210-rgpd in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git at 0e09b8c2 refs #210 : RGPD features : - Add rgpd checkbox for unlogged users on vote edition page This branch includes the following new commits: new 0e09b8c2 refs #210 : RGPD features : - Add rgpd checkbox for unlogged users on vote edition page The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 0e09b8c27d699ac04f8d669913ca94fcc36db629 Author: jcouteau <couteau@codelutin.com> Date: Tue Sep 11 17:49:34 2018 +0200 refs #210 : RGPD features : - Add rgpd checkbox for unlogged users on vote edition page -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/210-rgpd in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 0e09b8c27d699ac04f8d669913ca94fcc36db629 Author: jcouteau <couteau@codelutin.com> Date: Tue Sep 11 17:49:34 2018 +0200 refs #210 : RGPD features : - Add rgpd checkbox for unlogged users on vote edition page --- pollen-ui-riot-js/src/main/web/i18n/en.json | 3 ++ pollen-ui-riot-js/src/main/web/i18n/fr.json | 3 ++ .../src/main/web/tag/poll/EditVote.tag.html | 32 +++++++++++++++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/pollen-ui-riot-js/src/main/web/i18n/en.json b/pollen-ui-riot-js/src/main/web/i18n/en.json index 7b220644..3661ab30 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/en.json +++ b/pollen-ui-riot-js/src/main/web/i18n/en.json @@ -184,6 +184,9 @@ "poll_votes_tooManyPoint": "There is {0} point distributed too much", "poll_votes_voteByClickAndDrop": "Vote by click and drop", "poll_votes_voteByInput": "Vote by entry", + "poll_votes_validation_before" : "I read and accept the", + "poll_votes_validation_link" : "general terms of use.", + "poll_votes_validation_after" : "For the consultation needs, my vote will be stored for 2 years, then anonymized.", "poll_participants_noParticipant": "Voting list is not available", "poll_participants_download": "Download", "poll_participants_download_title": "Download voting list", diff --git a/pollen-ui-riot-js/src/main/web/i18n/fr.json b/pollen-ui-riot-js/src/main/web/i18n/fr.json index 0c3a0a3f..29c78761 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/fr.json +++ b/pollen-ui-riot-js/src/main/web/i18n/fr.json @@ -184,6 +184,9 @@ "poll_votes_tooManyPoint": "Il y a {0} point distribué en trop", "poll_votes_voteByClickAndDrop": "Vote par cliquer/glisser", "poll_votes_voteByInput": "Vote par saisie", + "poll_votes_validation_before" : "J'ai lu et j'accepte les", + "poll_votes_validation_link" : "conditions générales d'utilisation", + "poll_votes_validation_after" : ". Pour les besoins de la consultation, mon vote sera conservé au maximum 2 ans puis anonymisé.", "poll_participants_noParticipant": "Le liste d'émagement n'est pas diponible", "poll_participants_download": "Télécharger", "poll_participants_download_title": "Télécharger la liste d'émargement", diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html index 31889002..f014543f 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html @@ -119,13 +119,29 @@ </div> <div class="footer separator-top" if="{poll.choices && (poll.canVote || voteInEdition)}"> <div class="current-voter-actions separator-right"> + <div class="o-form-element" if={!session.isConnected()}> + <label class="c-field c-field--choice gtu-validation"> + <input type="checkbox" + onchange="{onRgpdAccepted}" + ref="rgpdCheckbox" + required> + {_t.validation_before} + <a class="c-link" + href="{session.configuration.endPoint}/v1/gtu" + target="_blank"> + {_t.validation_link} + </a> + {_t.validation_after} + </label> + + </div> <div class="current-voter-buttons"> <button if={!voteInEdition} class="c-button c-button--brand pull-right" type="submit" name="newVote" tabindex="{(poll.choices.length + 1) * 10}" - disabled={tooManyChoicesSelected || remainPoints || voting}> + disabled={tooManyChoicesSelected || remainPoints || voting || (!rgpdAccepted && !session.isConnected())}> <i class="fa fa-envelope"></i> {_t.toVote} </button> @@ -171,6 +187,7 @@ import moment from "moment"; this.moment = moment; + this.session = session; this.installBundle(session, "poll_votes"); this.tooManyChoicesSelected = false; @@ -277,6 +294,19 @@ this.update(); }; + this.onRgpdAccepted = () => { + if (session.isConnected()) { + this.rgpdAccepted = true; + } else { + let input = this.refs["rgpdCheckbox"]; + if (!input) { + this.rgpdAccepted = false; + } else { + this.rgpdAccepted = input.checked; + } + } + }; + this.resetVoteForm = () => { if (this.poll.canVote) { this.refs.voterName.value = null; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm