Skip to content

Commit

Permalink
Fix vote form
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel committed Dec 14, 2023
1 parent 2012802 commit c599071
Showing 1 changed file with 32 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,39 +129,43 @@ <h2 class="poll-preview-title">

<div class="info-grid">
<!-- 100 Percent Base -->
<mat-form-field *ngIf="!hideSelects.hundredPercentBase">
<mat-label>{{ PollPropertyVerbose.onehundred_percent_base | translate }}</mat-label>
<mat-select formControlName="onehundred_percent_base" required>
<ng-container *ngFor="let option of validPercentBases | keyvalue : keepEntryOrder">
<mat-option [value]="option.key">
{{
(isCreatedList || pollMethod === 'yna'
? alternativePercentBases[option.key]
: option.value
) | translate
}}
</mat-option>
</ng-container>
</mat-select>
</mat-form-field>
<ng-container *ngIf="isEVotingSelected && isCreated && !hideSelects.backendDuration">
<mat-form-field>
<mat-label>{{ 'Voting duration' | translate }}</mat-label>
<mat-select formControlName="backend" required>
<ng-container *ngFor="let option of pollBackendDurationChoices | keyvalue">
<div>
<mat-form-field *ngIf="!hideSelects.hundredPercentBase">
<mat-label>{{ PollPropertyVerbose.onehundred_percent_base | translate }}</mat-label>
<mat-select formControlName="onehundred_percent_base" required>
<ng-container *ngFor="let option of validPercentBases | keyvalue : keepEntryOrder">
<mat-option [value]="option.key">
{{ option.value | translate }}
{{
(isCreatedList || pollMethod === 'yna'
? alternativePercentBases[option.key]
: option.value
) | translate
}}
</mat-option>
</ng-container>
</mat-select>
<mat-hint
[innerText]="
'Voting ends after short (some seconds/minutes) or long (some days/weeks) time period.'
| translate
"
></mat-hint>
</mat-form-field>
</ng-container>
</div>
<div>
<ng-container *ngIf="isEVotingSelected && isCreated && !hideSelects.backendDuration">
<mat-form-field subscriptSizing="dynamic">
<mat-label>{{ 'Voting duration' | translate }}</mat-label>
<mat-select formControlName="backend" required>
<ng-container *ngFor="let option of pollBackendDurationChoices | keyvalue">
<mat-option [value]="option.key">
{{ option.value | translate }}
</mat-option>
</ng-container>
</mat-select>
<mat-hint
[innerText]="
'Voting ends after short (some seconds/minutes) or long (some days/weeks) time period.'
| translate
"
></mat-hint>
</mat-form-field>
</ng-container>
</div>
</div>
</form>
</div>

0 comments on commit c599071

Please sign in to comment.