This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 9f823008d0b17f83a0ad4631faf32f422625f3ef Author: Kevin Morin <morin@codelutin.com> Date: Tue Aug 1 18:55:38 2017 +0200 suppression ou modif de vote impossible si le sondage est terminé --- pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html index ca39f8d3..45cd12f4 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html @@ -120,14 +120,14 @@ require("../components/HumanInput.tag.html"); </div> <button type="button" class="c-button c-button--rounded u-xsmall c-button--brand" - if="{!poll.isClosed && vote.permission}" + if="{pollInProgress && vote.permission}" disabled="{voteInEdition != null}" onclick="{parent.onEditVote(vote)}"> <i class="fa fa-pencil-square-o"></i> </button> <button type="button" class="c-button c-button--rounded u-xsmall c-button--error" - if="{poll.permission || !poll.isClosed && vote.permission}" + if="{pollInProgress && (poll.permission || vote.permission)}" disabled="{voteInEdition != null}" onclick="{parent.deleteVote(vote)}"> <i class="fa fa-trash"></i> @@ -177,8 +177,10 @@ require("../components/HumanInput.tag.html"); const MIN_CHOICE_COLUMN_WIDTH = 100; this.loaded = false; let session = require("../../js/Session"); + let moment = require("moment"); let Choice = require("../../js/Choice"); this.installBundle(session, "poll_votes"); + this.pollInProgress = false; this.tooManyChoicesSelected = false; this.showChoiceHeader = true; this.voteTooltip = { @@ -189,6 +191,7 @@ require("../components/HumanInput.tag.html"); this.poll = require("../../js/Poll.js"); this.poll.loadVotes().then(() => { + this.pollInProgress = !this.poll.endDate || moment().isBefore(moment(this.poll.endDate)); this.updateShowChoiceContainer(); this.update(); }); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.