mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
fix positioning of group delete button and clearing of the cache on delete
This commit is contained in:

committed by
Marie Verdonck

parent
46defed6f2
commit
3c20cb7ee1
@@ -18,9 +18,11 @@
|
|||||||
[formLayout]="formLayout"
|
[formLayout]="formLayout"
|
||||||
(cancel)="onCancel()"
|
(cancel)="onCancel()"
|
||||||
(submitForm)="onSubmit()">
|
(submitForm)="onSubmit()">
|
||||||
<button class="btn btn-light delete-button" [disabled]="!(canDelete$ | async)" (click)="delete()">
|
<div *ngIf="groupBeingEdited != null" class="row">
|
||||||
<i class="fa fa-trash"></i> {{ messagePrefix + '.actions.delete' | translate}}
|
<button class="btn btn-light delete-button" [disabled]="!(canDelete$ | async)" (click)="delete()">
|
||||||
</button>
|
<i class="fa fa-trash"></i> {{ messagePrefix + '.actions.delete' | translate}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</ds-form>
|
</ds-form>
|
||||||
|
|
||||||
<ds-members-list *ngIf="groupBeingEdited != null" [messagePrefix]="messagePrefix + '.members-list'"></ds-members-list>
|
<ds-members-list *ngIf="groupBeingEdited != null" [messagePrefix]="messagePrefix + '.members-list'"></ds-members-list>
|
||||||
|
@@ -144,7 +144,7 @@ export class GroupFormComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
this.formModel = [
|
this.formModel = [
|
||||||
this.groupName,
|
this.groupName,
|
||||||
this.groupDescription
|
this.groupDescription,
|
||||||
];
|
];
|
||||||
this.formGroup = this.formBuilderService.createFormGroup(this.formModel);
|
this.formGroup = this.formBuilderService.createFormGroup(this.formModel);
|
||||||
this.subs.push(this.groupDataService.getActiveGroup().subscribe((activeGroup: Group) => {
|
this.subs.push(this.groupDataService.getActiveGroup().subscribe((activeGroup: Group) => {
|
||||||
@@ -349,8 +349,8 @@ export class GroupFormComponent implements OnInit, OnDestroy {
|
|||||||
* This method will ensure that the page gets reset and that the cache is cleared
|
* This method will ensure that the page gets reset and that the cache is cleared
|
||||||
*/
|
*/
|
||||||
reset() {
|
reset() {
|
||||||
this.groupDataService.getActiveGroup().pipe(take(1)).subscribe((group: Group) => {
|
this.groupDataService.getBrowseEndpoint().pipe(take(1)).subscribe((href: string) => {
|
||||||
this.requestService.removeByHrefSubstring(group.self);
|
this.requestService.removeByHrefSubstring(href);
|
||||||
});
|
});
|
||||||
this.onCancel();
|
this.onCancel();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user