branch feature/230_do_not_ask_for_gtu_validation_twice created (now e1b1e905)
This is an automated email from the git hooks/post-receive script. New change to branch feature/230_do_not_ask_for_gtu_validation_twice in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git at e1b1e905 Do not ask to validate GTU if already accepted by anonymous user This branch includes the following new commits: new d35b1638 Introduce methods in EditVote models new e1b1e905 Do not ask to validate GTU if already accepted by anonymous user The 2 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 d35b1638e39f6635db676cc3d7c5069a7dd67167 Author: Brendan Le Ny <bleny@codelutin.com> Date: Wed Oct 16 16:02:24 2019 +0200 Introduce methods in EditVote models refs #230 commit e1b1e9055b5c5bed7f4911c75dbcb443db0f3d56 Author: Brendan Le Ny <bleny@codelutin.com> Date: Wed Oct 16 18:21:46 2019 +0200 Do not ask to validate GTU if already accepted by anonymous user refs #230 -- 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/230_do_not_ask_for_gtu_validation_twice in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit d35b1638e39f6635db676cc3d7c5069a7dd67167 Author: Brendan Le Ny <bleny@codelutin.com> Date: Wed Oct 16 16:02:24 2019 +0200 Introduce methods in EditVote models refs #230 --- pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html | 6 +++++- pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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 fa0c318a..3a97563f 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,7 +119,7 @@ </div> <div class="footer separator-top" if="{poll.questions[0] && poll.questions[0].choices && (poll.questions[0].canVote || voteInEdition)}"> <div class="current-voter-actions separator-right"> - <div class="o-form-element" if={!session.isConnected()}> + <div class="o-form-element" if={mustValidateGtuToVote()}> <label class="c-field c-field--choice gtu-validation"> <input type="checkbox" required> @@ -326,6 +326,10 @@ this.error = null; }; + this.mustValidateGtuToVote = () => { + return !this.session.isConnected(); + }; + this.getVote = () => { let vote; diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html index e5a955c1..0246515f 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html @@ -106,7 +106,7 @@ </div> </Draggable> - <div class="o-form-element" if={!session.isConnected()}> + <div class="o-form-element" if={mustValidateGtuToVote()}> <label class="c-field c-field--choice gtu-validation"> <input type="checkbox" required> @@ -375,6 +375,10 @@ this.placeChoices(noAnim); }; + this.mustValidateGtuToVote = () => { + return !this.session.isConnected(); + }; + this.getVote = () => { let vote; -- 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/230_do_not_ask_for_gtu_validation_twice in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit e1b1e9055b5c5bed7f4911c75dbcb443db0f3d56 Author: Brendan Le Ny <bleny@codelutin.com> Date: Wed Oct 16 18:21:46 2019 +0200 Do not ask to validate GTU if already accepted by anonymous user refs #230 --- pollen-ui-riot-js/src/main/web/tag/poll/EditVote.tag.html | 6 +++++- pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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 3a97563f..83d352fc 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 @@ -327,7 +327,11 @@ }; this.mustValidateGtuToVote = () => { - return !this.session.isConnected(); + let anonymousAlreadyVoted = this.voteInEdition; + let voterIsRegistered = this.session.isConnected(); + let gtuAlreadyValidated = anonymousAlreadyVoted || voterIsRegistered; + let mustValidateGtuToVote = !gtuAlreadyValidated; + return mustValidateGtuToVote; }; this.getVote = () => { diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html index 0246515f..44840efe 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html @@ -376,7 +376,11 @@ }; this.mustValidateGtuToVote = () => { - return !this.session.isConnected(); + let anonymousAlreadyVoted = this.voteInEdition; + let voterIsRegistered = this.session.isConnected(); + let gtuAlreadyValidated = anonymousAlreadyVoted || voterIsRegistered; + let mustValidateGtuToVote = !gtuAlreadyValidated; + return mustValidateGtuToVote; }; this.getVote = () => { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm