Fixing min amounts in assignment meta info
This commit is contained in:
parent
7e763e8c07
commit
0b01b5576b
@ -32,10 +32,26 @@
|
|||||||
<small *ngIf="poll.pollmethod">
|
<small *ngIf="poll.pollmethod">
|
||||||
<span> {{ 'Voting method' | translate }}: {{ poll.pollmethodVerbose | translate }} </span>
|
<span> {{ 'Voting method' | translate }}: {{ poll.pollmethodVerbose | translate }} </span>
|
||||||
<!-- amount of votes -->
|
<!-- amount of votes -->
|
||||||
<span *ngIf="poll.votes_amount > 1"> ({{ poll.votes_amount }} {{ 'Votes' | translate }})</span>
|
<!-- <span *ngIf="poll.max_votes_amount > 1"> ({{ poll.max_votes_amount }} {{ 'Votes' | translate }})</span>
|
||||||
|
<span *ngIf="poll.max_votes_amount > 1"> ({{ poll.max_votes_amount }} {{ 'Votes' | translate }})</span> -->
|
||||||
<br />
|
<br />
|
||||||
</small>
|
</small>
|
||||||
|
|
||||||
|
<!-- Amount of Votes -->
|
||||||
|
<small *ngIf="poll.max_votes_amount > 1">
|
||||||
|
<ng-container *ngIf="poll.max_votes_amount !== poll.min_votes_amount">
|
||||||
|
<span> {{ pollPropertyVerbose.max_votes_amount | translate }}: {{ poll.max_votes_amount }}</span>
|
||||||
|
<br />
|
||||||
|
<span> {{ pollPropertyVerbose.min_votes_amount | translate }}: {{ poll.min_votes_amount }}</span>
|
||||||
|
<br />
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container *ngIf="poll.max_votes_amount === poll.min_votes_amount">
|
||||||
|
<span> {{ 'Votes' | translate }}: {{ poll.max_votes_amount }} </span>
|
||||||
|
<br />
|
||||||
|
</ng-container>
|
||||||
|
</small>
|
||||||
|
|
||||||
<!-- 100% base -->
|
<!-- 100% base -->
|
||||||
<small *ngIf="poll.onehundred_percent_base">
|
<small *ngIf="poll.onehundred_percent_base">
|
||||||
{{ '100% base' | translate }}: {{ poll.percentBaseVerbose | translate }}
|
{{ '100% base' | translate }}: {{ poll.percentBaseVerbose | translate }}
|
||||||
|
@ -378,8 +378,11 @@ class AssignmentPoll(RESTModelMixin, BasePoll):
|
|||||||
decimal_places=6,
|
decimal_places=6,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
min_votes_amount = models.IntegerField(default=1, validators=[MinValueValidator(1)])
|
||||||
|
""" For "votes" mode: The min amount of votes a voter can give. """
|
||||||
|
|
||||||
max_votes_amount = models.IntegerField(default=1, validators=[MinValueValidator(1)])
|
max_votes_amount = models.IntegerField(default=1, validators=[MinValueValidator(1)])
|
||||||
""" For "votes" mode: The amount of votes a voter can give. """
|
""" For "votes" mode: The max amount of votes a voter can give. """
|
||||||
|
|
||||||
allow_multiple_votes_per_candidate = models.BooleanField(default=False)
|
allow_multiple_votes_per_candidate = models.BooleanField(default=False)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user