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 e106f6fd655759da1a55fd615147e826e432d27e Author: Kevin Morin <morin@codelutin.com> Date: Fri Aug 4 11:59:52 2017 +0200 fixes #125 soumission multiple de commentaire --- pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html index dbe2bb68..49032792 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Comments.tag.html @@ -51,7 +51,8 @@ require("./Report.tag.html"); </div> <div class="actions-right"> <button type="submit" - class="c-button c-button--info pull-right"> + class="c-button c-button--info pull-right" + disabled="{sendingComment}"> <i class="fa fa-paper-plane"/> {__.sendComment} </button> @@ -189,6 +190,7 @@ require("./Report.tag.html"); let session = require("../../js/Session"); this.installBundle(session, "poll_comments"); let moment = require("moment"); + this.sendingComment = false; this.poll = require("../../js/Poll.js"); @@ -226,9 +228,16 @@ require("./Report.tag.html"); this.addComment = (e) => { e.preventDefault(); e.stopPropagation(); + this.sendingComment = true; + this.update(); this.poll.addComment(this.refs.author.value, this.refs.text.value) .then(() => { this.refs.text.value = ""; + this.sendingComment = false; + this.update(); + }, (error) => { + this.sendingComment = false; + this.update(); }); }; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.