This is an automated email from the git hooks/post-receive script. New commit to branch feature/bug-on-save in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit aef6cc42b0b8877795d5c6aa1b8226472b90807c Author: dcosse <cosse@codelutin.com> Date: Tue Oct 8 09:14:51 2019 +0200 refs #248 avoid error in console JS when navigate from tab o tab --- pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html | 8 ++++---- pollen-ui-riot-js/src/main/web/tag/poll/Settings.tag.html | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html index 93f67d4d..4fbca611 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditPoll.tag.html @@ -142,13 +142,13 @@ import "./CheckEmails.tag.html"; this.submitStep = (e) => { e.preventDefault(); e.stopPropagation(); - if (this.form.step === 0) { + if (this.form.step === 0 && this.refs.description) { this.refs.description.submit(); - } else if (this.form.step === 1) { + } else if (this.form.step === 1 && this.refs.choices) { this.refs.choices.submit(); - } else if (this.form.step === 2) { + } else if (this.form.step === 2 && this.refs.settings) { this.refs.settings.submit(); - } else if (this.form.step === 3) { + } else if (this.form.step === 3 && this.refs.voters) { this.refs.voters.submit(); } if (!this.form.model.gtuValidated && !this.showSummary && (!this.form.creation || this.form.step === this.form.steps.length - 1)) { diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Settings.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Settings.tag.html index 513121ab..5591cd54 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Settings.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Settings.tag.html @@ -518,11 +518,11 @@ import "../voteCountingType/MajorityJudgmentConfig.tag.html"; this.form.model.beginChoiceDate = this.refs.addChoices.checked ? this.refs.beginChoiceDate.getValue() : undefined; this.form.model.endChoiceDate = this.refs.addChoices.checked ? this.refs.endChoiceDate.getValue() : undefined; - this.form.model.beginDate = this.refs.votePeriod.checked ? this.refs.beginDate.getValue() : undefined; - this.form.model.voteVisibility = this.refs.voteVisibility.value; - this.form.model.anonymousVoteAllowed = this.refs.anonymousVote.checked; - this.form.model.resultVisibility = this.refs.resultVisibility.value; - this.form.model.commentVisibility = this.refs.commentVisibility.value; + this.form.model.beginDate = this.refs.votePeriod && this.refs.votePeriod.checked ? this.refs.beginDate.getValue() : undefined; + this.form.model.voteVisibility = this.refs.voteVisibility ? this.refs.voteVisibility.value : 'EVERYBODY'; + this.form.model.anonymousVoteAllowed = this.refs.anonymousVote ? this.refs.anonymousVote.checked : false; + this.form.model.resultVisibility = this.refs.resultVisibility ? this.refs.resultVisibility.value : 'EVERYBODY'; + this.form.model.commentVisibility = this.refs.commentVisibility ? this.refs.commentVisibility.value : 'EVERYBODY'; this.form.model.voteCountingConfig = this.refs.config && typeof this.refs.config.getConfig === "function" ? this.refs.config.getConfig() : {}; } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.