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 872378392091897cf4dd5bf235028dcf37d86eb5 Author: Kevin Morin <morin@codelutin.com> Date: Tue May 16 10:43:02 2017 +0200 Création de sondage : validation des choix avant de passer à l'étape suivante. --- pollen-ui-riot-js/src/main/web/tag/components/date-picker.tag.html | 1 + pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html | 1 + pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/components/date-picker.tag.html b/pollen-ui-riot-js/src/main/web/tag/components/date-picker.tag.html index b920482..de149ab 100644 --- a/pollen-ui-riot-js/src/main/web/tag/components/date-picker.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/components/date-picker.tag.html @@ -1,6 +1,7 @@ <date-picker> <input type="date" class="calendar-field" + required={opts.required} onclick="{open}" value={opts.date.date.format(session.dateInputSupported ? "YYYY-MM-DD" : format)} readonly="{!session.dateInputSupported}" diff --git a/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html b/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html index 9c15f1c..4e5c9dc 100644 --- a/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html @@ -4,6 +4,7 @@ onclick="{open}" value="{opts.time.time.format('LT')}" readonly="{!session.timeInputSupported}" + required={opts.required} onblur={onTimeChange}/> <div class="c-calendar c-calendar--higher" if="{opts.time.isVisible && !session.timeInputSupported}"> diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html index e92b6f6..b28146d 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html @@ -16,6 +16,7 @@ require("../components/time-picker.tag.html"); placeholder="{__.text_placeholder}" disabled={opts.disabled} value={valueText} + required={opts.choice.choiceType === 'TEXT'} onchange={onTextChange}/> <button type="button" class="choice-type-button" @@ -52,6 +53,7 @@ require("../components/time-picker.tag.html"); <input type="file" ref="choiceResource" onchange={onRessourceChange} + required={opts.choice.choiceType === 'RESOURCE'} disabled={opts.disabled}/> </div> </div> @@ -67,6 +69,7 @@ require("../components/time-picker.tag.html"); </button> <date-picker ref="choiceDate" class="{opts.choice.choiceType.startsWith('DATE') ? 'selected' : 'hidden'}" + required={opts.choice.choiceType.startsWith('DATE')} date="{date}"/> <button type="button" @@ -79,6 +82,7 @@ require("../components/time-picker.tag.html"); </button> <time-picker ref="choiceTime" class="{opts.choice.choiceType === 'DATETIME' ? 'selected' : 'hidden'}" + required={opts.choice.choiceType === 'DATETIME'} time="{time}"/> <button type="button" @@ -288,7 +292,7 @@ require("../components/time-picker.tag.html"); } .add-file input[type="file"] { - display: none; + visibility: hidden; } textarea { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.