Skip to content

Commit ee705f0

Browse files
authored
Merge pull request DSpace#2130 from amanbudgujar/virsoftech-angular
EPerson creation page changed
2 parents b4042e7 + f2ecef8 commit ee705f0

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ <h4>{{messagePrefix + '.edit' | translate}}</h4>
1313
[formGroup]="formGroup"
1414
[formLayout]="formLayout"
1515
[displayCancel]="false"
16+
[submitLabel]="submitLabel"
1617
(submitForm)="onSubmit()">
1718
<div before class="btn-group">
1819
<button (click)="onCancel()"
1920
class="btn btn-outline-secondary"><i class="fas fa-arrow-left"></i> {{messagePrefix + '.return' | translate}}</button>
2021
</div>
21-
<div between class="btn-group">
22+
<div *ngIf="displayResetPassword" between class="btn-group">
2223
<button class="btn btn-primary" [disabled]="!(canReset$ | async)" (click)="resetPassword()">
2324
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
2425
</button>

src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
165165
*/
166166
isImpersonated = false;
167167

168+
/**
169+
* A boolean that indicate if to display EPersonForm's Rest password button
170+
*/
171+
displayResetPassword = false;
172+
173+
/**
174+
* A string that indicate the label of Submit button
175+
*/
176+
submitLabel = 'form.create';
168177
/**
169178
* Subscription to email field value change
170179
*/
@@ -188,6 +197,8 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
188197
this.epersonInitial = eperson;
189198
if (hasValue(eperson)) {
190199
this.isImpersonated = this.authService.isImpersonatingUser(eperson.id);
200+
this.displayResetPassword = true;
201+
this.submitLabel = 'form.submit';
191202
}
192203
}));
193204
}

src/assets/i18n/en.json5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,6 +1751,8 @@
17511751

17521752
"form.submit": "Save",
17531753

1754+
"form.create": "Create",
1755+
17541756
"form.repeatable.sort.tip": "Drop the item in the new position",
17551757

17561758

0 commit comments

Comments
 (0)