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 f0438cb43bab89b1a6040982b945c1afe237bed7 Author: Kevin Morin <morin@codelutin.com> Date: Fri Aug 4 12:06:13 2017 +0200 fixes #124 soumission multiple de choix --- pollen-ui-riot-js/src/main/web/tag/poll/Votes.tag.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 4ab1a92c..9fe80519 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 @@ -166,7 +166,8 @@ require("../components/HumanInput.tag.html"); </div> <button type="submit" class="c-button c-button--success" - tooltips="{__.addChoice}"> + tooltips="{__.addChoice}" + disabled="{addingChoice}"> <i class="fa fa-plus"></i> </button> </div> @@ -188,6 +189,7 @@ require("../components/HumanInput.tag.html"); choice: null, vote: null }; + this.addingChoice = false; this.poll = require("../../js/Poll.js"); this.poll.loadVotes().then(() => { @@ -370,11 +372,17 @@ require("../components/HumanInput.tag.html"); this.addChoice = (e) => { e.preventDefault(); e.stopPropagation(); + + this.addingChoice = true; + this.update(); + this.refs.choice.submit(); this.poll.addChoice(this.choiceToAdd).then(() => { + this.addingChoice = false; this.choiceToAdd = this.poll.initChoice(this.choiceToAdd); this.update(); }, errors => { + this.addingChoice = false; this.bus.trigger("message", errors); this.update(); }); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.