Skip to content

Commit

Permalink
Fix meeting language edit not disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel committed Oct 20, 2023
1 parent 18a7579 commit c2a4dd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h2 *ngIf="!isCreateView">{{ editMeetingLabel | translate }}</h2>

<mat-form-field>
<mat-label>{{ 'Language' | translate }}</mat-label>
<mat-select formControlName="language" [disabled]="!isCreateView || !!theDuplicateFromId">
<mat-select formControlName="language">
<mat-option *ngFor="let choice of translations | keyvalue" [value]="choice.key">
{{ choice.value }}
</mat-option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export class MeetingEditComponent extends BaseComponent implements OnInit {
super.setTitle(ADD_MEETING_LABEL);
} else {
super.setTitle(EDIT_MEETING_LABEL);
this.meetingForm.get(`language`)?.disable();
}

this.availableUsers = userRepo.getViewModelListObservable();
Expand Down Expand Up @@ -208,6 +209,9 @@ export class MeetingEditComponent extends BaseComponent implements OnInit {
this.theDuplicateFromId = id;
if (id) {
this.meetingForm.get(`language`)?.setValue(this.meetingRepo.getViewModel(id).language);
this.meetingForm.get(`language`)?.disable();
} else {
this.meetingForm.get(`language`)?.enable();
}
}

Expand Down

0 comments on commit c2a4dd9

Please sign in to comment.