branch feature/multi-ui updated (ac9d31fa -> a2f0d1d4)
This is an automated email from the git hooks/post-receive script. New change to branch feature/multi-ui in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from ac9d31fa fix error lint new ccf912ec Introduce methods in EditVote models new 6e173019 Do not ask to validate GTU if already accepted by anonymous user new 9c1539d6 Modale de confirmation de suppression de question new a2f0d1d4 Merge branch 'feature/multi-ui' of gitlab.nuiton.org:chorem/pollen into feature/multi-ui The 4 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 a2f0d1d49dd5ee41e1b0a322c947d71d969c0e16 Merge: 9c1539d6 ac9d31fa Author: jcouteau <couteau@codelutin.com> Date: Wed Oct 23 09:54:32 2019 +0200 Merge branch 'feature/multi-ui' of gitlab.nuiton.org:chorem/pollen into feature/multi-ui commit 9c1539d6d6951f3f3fdcf7b7ea830f5bdc94d240 Author: jcouteau <couteau@codelutin.com> Date: Wed Oct 23 09:54:28 2019 +0200 Modale de confirmation de suppression de question commit 6e1730191d47e1b1bc0c4c83c3207ec56bdb3016 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 commit ccf912eca2d13cc7adfc62f37f83271f79726eb9 Author: Brendan Le Ny <bleny@codelutin.com> Date: Wed Oct 16 16:02:24 2019 +0200 Introduce methods in EditVote models refs #230 Summary of changes: pollen-ui-riot-js/src/main/web/i18n/en.json | 1 + pollen-ui-riot-js/src/main/web/i18n/fr.json | 1 + .../src/main/web/tag/poll/EditQuestions.tag.html | 17 ++++++++++++----- .../src/main/web/tag/poll/EditVote.tag.html | 10 +++++++++- .../src/main/web/tag/poll/EditVoteOrder.tag.html | 10 +++++++++- 5 files changed, 32 insertions(+), 7 deletions(-) -- 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/multi-ui in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit ccf912eca2d13cc7adfc62f37f83271f79726eb9 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 36657324..0c96d116 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="{question && question.choices && (question.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> @@ -338,6 +338,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 aaaa341b..22d912b3 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> @@ -387,6 +387,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/multi-ui in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 6e1730191d47e1b1bc0c4c83c3207ec56bdb3016 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 0c96d116..952dc388 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 @@ -339,7 +339,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 22d912b3..e3fc412e 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 @@ -388,7 +388,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>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/multi-ui in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 9c1539d6d6951f3f3fdcf7b7ea830f5bdc94d240 Author: jcouteau <couteau@codelutin.com> Date: Wed Oct 23 09:54:28 2019 +0200 Modale de confirmation de suppression de question --- pollen-ui-riot-js/src/main/web/i18n/en.json | 1 + pollen-ui-riot-js/src/main/web/i18n/fr.json | 1 + .../src/main/web/tag/poll/EditQuestions.tag.html | 17 ++++++++++++----- 3 files changed, 14 insertions(+), 5 deletions(-) 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 0fce252c..3fc6d58c 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/en.json +++ b/pollen-ui-riot-js/src/main/web/i18n/en.json @@ -309,6 +309,7 @@ "poll_editQuestions_titleNotBlank": "Title must be not blank", "poll_editQuestions_description": "Description", "poll_editQuestions_descriptionPlaceHolder": "Enter question description", + "poll_editQuestions_deleteQuestionMessage": "Are you sure you want to delete the question ?", "poll_settings_pollType": "Poll opening", "poll_settings_pollType_FREE": "Open to all", "poll_settings_pollType_FREE_help": "Anyone with the poll link can vote.", 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 ae65c8d6..a3e35f3b 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/fr.json +++ b/pollen-ui-riot-js/src/main/web/i18n/fr.json @@ -309,6 +309,7 @@ "poll_editQuestions_titleNotBlank": "Le titre ne doit pas être blanc", "poll_editQuestions_description": "Description", "poll_editQuestions_descriptionPlaceHolder": "Renseignez la description de la question", + "poll_editQuestions_deleteQuestionMessage": "Êtes-vous sûr de vouloir supprimer la question ?", "poll_settings_pollType": "Ouverture du sondage", "poll_settings_pollType_FREE": "Ouvert à tous", "poll_settings_pollType_FREE_help": "Toutes les personnes ayant le lien du sondage peuvent voter.", diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestions.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestions.tag.html index 996138d2..614c3f40 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestions.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditQuestions.tag.html @@ -67,11 +67,18 @@ import "./EditQuestionsSettings.tag.html"; this.deleteQuestion = () => { if (!this.form.hasVotes) { - this.form.deleteQuestion(); - if (this.form.questionEdited >= this.form.model.questions.length) { - this.form.questionEdited = this.form.model.questions.length -1; - } - this.reloadQuestion(); + this.confirm(this._t.deleteQuestionMessage).then((confirm) => { + if (!confirm) { + return Promise.reject(); + } + }).then(() => { + this.form.deleteQuestion(); + if (this.form.questionEdited >= this.form.model.questions.length) { + this.form.questionEdited = this.form.model.questions.length -1; + } + this.reloadQuestion(); + }); + } }; -- 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/multi-ui in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit a2f0d1d49dd5ee41e1b0a322c947d71d969c0e16 Merge: 9c1539d6 ac9d31fa Author: jcouteau <couteau@codelutin.com> Date: Wed Oct 23 09:54:32 2019 +0200 Merge branch 'feature/multi-ui' of gitlab.nuiton.org:chorem/pollen into feature/multi-ui pollen-ui-riot-js/src/main/web/tag/poll/EditQuestions.tag.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm