Merge pull request #2130 from amanbudgujar/virsoftech-angular

EPerson creation page changed
This commit is contained in:
Tim Donohue
2023-03-23 14:38:37 -05:00
committed by GitHub
3 changed files with 15 additions and 1 deletions

View File

@@ -13,12 +13,13 @@
[formGroup]="formGroup"
[formLayout]="formLayout"
[displayCancel]="false"
[submitLabel]="submitLabel"
(submitForm)="onSubmit()">
<div before class="btn-group">
<button (click)="onCancel()"
class="btn btn-outline-secondary"><i class="fas fa-arrow-left"></i> {{messagePrefix + '.return' | translate}}</button>
</div>
<div between class="btn-group">
<div *ngIf="displayResetPassword" between class="btn-group">
<button class="btn btn-primary" [disabled]="!(canReset$ | async)" (click)="resetPassword()">
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
</button>

View File

@@ -165,6 +165,15 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
*/
isImpersonated = false;
/**
* A boolean that indicate if to display EPersonForm's Rest password button
*/
displayResetPassword = false;
/**
* A string that indicate the label of Submit button
*/
submitLabel = 'form.create';
/**
* Subscription to email field value change
*/
@@ -188,6 +197,8 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
this.epersonInitial = eperson;
if (hasValue(eperson)) {
this.isImpersonated = this.authService.isImpersonatingUser(eperson.id);
this.displayResetPassword = true;
this.submitLabel = 'form.submit';
}
}));
}

View File

@@ -1751,6 +1751,8 @@
"form.submit": "Save",
"form.create": "Create",
"form.repeatable.sort.tip": "Drop the item in the new position",