MOBILE-3320 survey: Fix ngModel requires name error in console
parent
b974b6bf43
commit
e5b63b9dc2
|
@ -78,38 +78,41 @@
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- Subquestion -->
|
<!-- Subquestion -->
|
||||||
<ion-radio-group [(ngModel)]="answers[question.name]" [required]="question.required" [name]="question.name">
|
<ng-container *ngIf="question.parent !== 0">
|
||||||
<ion-row *ngIf="question.parent !== 0" class="ion-align-items-center ion-padding-horizontal" [class.even]="isEven">
|
<ion-radio-group [(ngModel)]="answers[question.name]" [required]="question.required" [name]="question.name">
|
||||||
|
<ion-row *ngIf="question.parent !== 0" class="ion-align-items-center ion-padding-horizontal"
|
||||||
|
[class.even]="isEven">
|
||||||
|
|
||||||
<ion-col size="7">
|
<ion-col size="7">
|
||||||
<ion-label id="addon-mod_survey-{{question.id}}">
|
<ion-label id="addon-mod_survey-{{question.id}}">
|
||||||
<span [core-mark-required]="question.required">
|
<span [core-mark-required]="question.required">
|
||||||
<strong>{{question.num}}.</strong> {{ question.text }}
|
<strong>{{question.num}}.</strong> {{ question.text }}
|
||||||
</span>
|
</span>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
|
|
||||||
<!-- Tablet view: radio buttons -->
|
<!-- Tablet view: radio buttons -->
|
||||||
<ion-col class="ion-hide-md-down ion-text-center" size="1"
|
<ion-col class="ion-hide-md-down ion-text-center" size="1"
|
||||||
*ngFor="let option of question.optionsArray; let value=index;"
|
*ngFor="let option of question.optionsArray; let value=index;"
|
||||||
>
|
>
|
||||||
<!-- Empty slot to avoid errors on migration tslint checks -->
|
<!-- Empty slot to avoid errors on migration tslint checks -->
|
||||||
<ion-radio [value]="value + 1" [attr.aria-label]="question.num + '. '+question.text + ': ' + option">
|
<ion-radio [value]="value + 1" [attr.aria-label]="question.num + '. '+question.text + ': ' + option">
|
||||||
</ion-radio>
|
</ion-radio>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
<ion-col class="ion-hide-md-up" size="5">
|
<ion-col class="ion-hide-md-up" size="5">
|
||||||
<ion-select class="ion-padding" [(ngModel)]="answers[question.name]" [required]="question.required"
|
<ion-select class="ion-padding" [(ngModel)]="answers[question.name]" [required]="question.required"
|
||||||
[attr.aria-labelledby]="'addon-mod_survey-'+question.id" interface="action-sheet"
|
[attr.aria-labelledby]="'addon-mod_survey-'+question.id" interface="action-sheet"
|
||||||
[name]="question.name">
|
[name]="question.name">
|
||||||
<ion-select-option value="-1" selected disabled>{{ 'core.choose' | translate }}</ion-select-option>
|
<ion-select-option value="-1" selected disabled>{{ 'core.choose' | translate }}</ion-select-option>
|
||||||
<ion-select-option *ngFor="let option of question.optionsArray; let value=index;"
|
<ion-select-option *ngFor="let option of question.optionsArray; let value=index;"
|
||||||
[value]="value +1">
|
[value]="value +1">
|
||||||
{{option}}
|
{{option}}
|
||||||
</ion-select-option>
|
</ion-select-option>
|
||||||
</ion-select>
|
</ion-select>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
</ion-radio-group>
|
</ion-radio-group>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<!-- Single question (don't belong to a category) -->
|
<!-- Single question (don't belong to a category) -->
|
||||||
<ng-container *ngIf="(!question.multiArray || question.multiArray.length == 0) && question.parent === 0">
|
<ng-container *ngIf="(!question.multiArray || question.multiArray.length == 0) && question.parent === 0">
|
||||||
|
|
Loading…
Reference in New Issue