MOBILE-3833 data: Fix unable to change group for new entries
parent
f02ba784e3
commit
604e866943
|
@ -23,8 +23,8 @@
|
|||
|
||||
<ion-item class="ion-text-wrap core-group-selector">
|
||||
<ion-label id="addon-bigbluebuttonbn-groupslabel">
|
||||
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
|
||||
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>
|
||||
<ng-container *ngIf="groupInfo.separateGroups">{{ 'core.groupsseparate' | translate }}</ng-container>
|
||||
<ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsvisible' | translate }}</ng-container>
|
||||
</ion-label>
|
||||
<ion-select [(ngModel)]="groupId" (ionChange)="groupChanged()" aria-labelledby="addon-bigbluebuttonbn-groupslabel"
|
||||
interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}">
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
<core-loading [hideUntil]="loaded">
|
||||
<ion-item class="ion-text-wrap core-group-selector" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
|
||||
<ion-label id="addon-data-groupslabel">
|
||||
<ng-container *ngIf="groupInfo.separateGroups">{{ 'core.groupsvisible' | translate }}</ng-container>
|
||||
<ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsseparate' | translate }}</ng-container>
|
||||
<ng-container *ngIf="groupInfo.separateGroups">{{ 'core.groupsseparate' | translate }}</ng-container>
|
||||
<ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsvisible' | translate }}</ng-container>
|
||||
</ion-label>
|
||||
<ion-select [(ngModel)]="selectedGroup" (ionChange)="setGroup(selectedGroup)" aria-labelledby="addon-data-groupslabel"
|
||||
interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}">
|
||||
|
|
|
@ -163,8 +163,10 @@ export class AddonModDataEditPage implements OnInit {
|
|||
const entry = await AddonModDataHelper.fetchEntry(this.database, this.fieldsArray, this.entryId || 0);
|
||||
this.entry = entry.entry;
|
||||
|
||||
// Load correct group.
|
||||
this.selectedGroup = this.entry.groupid;
|
||||
if (this.entryId) {
|
||||
// Load correct group.
|
||||
this.selectedGroup = this.entry.groupid;
|
||||
}
|
||||
|
||||
// Check permissions when adding a new entry or offline entry.
|
||||
if (!this.isEditing) {
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
<ion-list *ngIf="access && access.canviewanalysis && !access.isempty">
|
||||
<ion-item class="ion-text-wrap core-group-selector" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
|
||||
<ion-label id="addon-feedback-groupslabel">
|
||||
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
|
||||
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>
|
||||
<ng-container *ngIf="groupInfo.separateGroups">{{ 'core.groupsseparate' | translate }}</ng-container>
|
||||
<ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsvisible' | translate }}</ng-container>
|
||||
</ion-label>
|
||||
<ion-select [(ngModel)]="group" (ionChange)="setGroup(group)" aria-labelledby="addon-feedback-groupslabel"
|
||||
interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}">
|
||||
|
|
Loading…
Reference in New Issue