forked from EVOgeek/Vmeda.Online
		
	MOBILE-3833 data: Fix unable to change group for new entries
This commit is contained in:
		
							parent
							
								
									f02ba784e3
								
							
						
					
					
						commit
						604e866943
					
				| @ -20,8 +20,8 @@ | |||||||
|     <core-loading [hideUntil]="loaded"> |     <core-loading [hideUntil]="loaded"> | ||||||
|         <ion-item class="ion-text-wrap core-group-selector" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)"> |         <ion-item class="ion-text-wrap core-group-selector" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)"> | ||||||
|             <ion-label id="addon-data-groupslabel"> |             <ion-label id="addon-data-groupslabel"> | ||||||
|                 <ng-container *ngIf="groupInfo.separateGroups">{{ 'core.groupsvisible' | translate }}</ng-container> |                 <ng-container *ngIf="groupInfo.separateGroups">{{ 'core.groupsseparate' | translate }}</ng-container> | ||||||
|                 <ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsseparate' | translate }}</ng-container> |                 <ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsvisible' | translate }}</ng-container> | ||||||
|             </ion-label> |             </ion-label> | ||||||
|             <ion-select [(ngModel)]="selectedGroup" (ionChange)="setGroup(selectedGroup)" aria-labelledby="addon-data-groupslabel" |             <ion-select [(ngModel)]="selectedGroup" (ionChange)="setGroup(selectedGroup)" aria-labelledby="addon-data-groupslabel" | ||||||
|                 interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}"> |                 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); |             const entry = await AddonModDataHelper.fetchEntry(this.database, this.fieldsArray, this.entryId || 0); | ||||||
|             this.entry = entry.entry; |             this.entry = entry.entry; | ||||||
| 
 | 
 | ||||||
|  |             if (this.entryId) { | ||||||
|                 // Load correct group.
 |                 // Load correct group.
 | ||||||
|                 this.selectedGroup = this.entry.groupid; |                 this.selectedGroup = this.entry.groupid; | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
|             // Check permissions when adding a new entry or offline entry.
 |             // Check permissions when adding a new entry or offline entry.
 | ||||||
|             if (!this.isEditing) { |             if (!this.isEditing) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user