choices lighter and work

This commit is contained in:
Baptiste Lemoine 2020-01-23 15:24:39 +01:00
parent 7bc53e198d
commit 22bd836a16
3 changed files with 14 additions and 3 deletions

View File

@ -74,7 +74,7 @@
<framadate-vote-choice <framadate-vote-choice
[choice]="choice" [choice]="choice"
[pollIsSpecialDate]="config.currentPoll.data.kind == 'date'" [pollIsSpecialDate]="config.currentPoll.data.kind == 'date'"
[simpleAnswer]="config.currentPoll.data.allowedAnswers == ['yes']" ></framadate-vote-choice > [simpleAnswer]="config.currentPoll.data.allowedAnswers.length == 1 " ></framadate-vote-choice >
</div > </div >
</div > </div >
<button <button
@ -108,6 +108,14 @@
name="crname" name="crname"
[(ngModel)]='config.myName' [(ngModel)]='config.myName'
id="crname" > id="crname" >
<input
type="text"
name="cremail"
id="email_comment"
[(ngModel)]="config.myEmail" >
<label for='email_comment' >
<i class='fa fa-envelope' ></i >
</label >
<div > <div >
<label for="comment" >Votre commentaire :</label > <label for="comment" >Votre commentaire :</label >
<br > <br >

View File

@ -1,5 +1,7 @@
<div class="choicebox selection-{{choice.answer}}" ><!-- add .choicebox--active to most voted --> <div class="choicebox selection-{{choice.answer}}" >
<!-- add .choicebox--active to most voted -->
<button <button
*ngIf='showChangeChoicebutton'
class='btn btn--primary' class='btn btn--primary'
(click)=' choice.simpleAnswer = !choice.simpleAnswer' > (click)=' choice.simpleAnswer = !choice.simpleAnswer' >
<i class='fa fa-gears' ></i > <i class='fa fa-gears' ></i >
@ -55,7 +57,7 @@
</span > </span >
<span <span
class="complex-answers" class="complex-answers"
*ngIf="!choice.simpleAnswer" > *ngIf="!simpleAnswer" >
<button <button
class="choicebox__btn choicebox__btn--maybe" class="choicebox__btn choicebox__btn--maybe"
type="button" type="button"

View File

@ -25,6 +25,7 @@ interface VoteChoice {
}) })
export class VoteChoiceComponent { export class VoteChoiceComponent {
public showChangeChoicebutton = false;
@Input() public choice: any; @Input() public choice: any;
@Input() public simpleAnswer: boolean = true; @Input() public simpleAnswer: boolean = true;
@Input() public pollIsSpecialDate: boolean = false; @Input() public pollIsSpecialDate: boolean = false;