mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Changes associated with #2026
While creating a new EPerson - * Reset password button is not displayed. * Submit button label changed from 'Save' to 'Create'.
This commit is contained in:
@@ -13,12 +13,13 @@
|
|||||||
[formGroup]="formGroup"
|
[formGroup]="formGroup"
|
||||||
[formLayout]="formLayout"
|
[formLayout]="formLayout"
|
||||||
[displayCancel]="false"
|
[displayCancel]="false"
|
||||||
|
[submitLabel]="submitLabel"
|
||||||
(submitForm)="onSubmit()">
|
(submitForm)="onSubmit()">
|
||||||
<div before class="btn-group">
|
<div before class="btn-group">
|
||||||
<button (click)="onCancel()"
|
<button (click)="onCancel()"
|
||||||
class="btn btn-outline-secondary"><i class="fas fa-arrow-left"></i> {{messagePrefix + '.return' | translate}}</button>
|
class="btn btn-outline-secondary"><i class="fas fa-arrow-left"></i> {{messagePrefix + '.return' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div between class="btn-group">
|
<div *ngIf="displayResetPassword" between class="btn-group">
|
||||||
<button class="btn btn-primary" [disabled]="!(canReset$ | async)" (click)="resetPassword()">
|
<button class="btn btn-primary" [disabled]="!(canReset$ | async)" (click)="resetPassword()">
|
||||||
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
|
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -164,6 +164,16 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
|
|||||||
* Whether or not this EPerson is currently being impersonated
|
* Whether or not this EPerson is currently being impersonated
|
||||||
*/
|
*/
|
||||||
isImpersonated = false;
|
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
|
* Subscription to email field value change
|
||||||
@@ -188,6 +198,8 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
|
|||||||
this.epersonInitial = eperson;
|
this.epersonInitial = eperson;
|
||||||
if (hasValue(eperson)) {
|
if (hasValue(eperson)) {
|
||||||
this.isImpersonated = this.authService.isImpersonatingUser(eperson.id);
|
this.isImpersonated = this.authService.isImpersonatingUser(eperson.id);
|
||||||
|
this.displayResetPassword = true;
|
||||||
|
this.submitLabel = 'form.submit';
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@@ -14,6 +14,8 @@
|
|||||||
<tr class="text-center">
|
<tr class="text-center">
|
||||||
<th>{{'resource-policies.form.eperson-group-list.table.headers.id' | translate}}</th>
|
<th>{{'resource-policies.form.eperson-group-list.table.headers.id' | translate}}</th>
|
||||||
<th>{{'resource-policies.form.eperson-group-list.table.headers.name' | translate}}</th>
|
<th>{{'resource-policies.form.eperson-group-list.table.headers.name' | translate}}</th>
|
||||||
|
<th *ngIf="isListOfEPerson">{{'resource-policies.form.eperson-group-list.table.headers.identity' | translate}}</th>
|
||||||
|
<th *ngIf="!isListOfEPerson">{{'resource-policies.form.eperson-group-list.table.headers.collcomm' | translate}}</th>
|
||||||
<th>{{'resource-policies.form.eperson-group-list.table.headers.action' | translate}}</th>
|
<th>{{'resource-policies.form.eperson-group-list.table.headers.action' | translate}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -22,6 +24,11 @@
|
|||||||
[class.table-primary]="isSelected(entry) | async">
|
[class.table-primary]="isSelected(entry) | async">
|
||||||
<td>{{entry.id}}</td>
|
<td>{{entry.id}}</td>
|
||||||
<td>{{dsoNameService.getName(entry)}}</td>
|
<td>{{dsoNameService.getName(entry)}}</td>
|
||||||
|
<td *ngIf="isListOfEPerson">
|
||||||
|
{{'resource-policies.form.eperson-group-list.cell.email' | translate}} {{entry.email}}<br/>
|
||||||
|
{{'resource-policies.form.eperson-group-list.cell.netid' | translate}} {{entry.netid}}
|
||||||
|
</td>
|
||||||
|
<td *ngIf="!isListOfEPerson">{{(entry.object | async)?.payload?.name}}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<button class="btn btn-sm btn-outline-primary" (click)="emitSelect(entry)">
|
<button class="btn btn-sm btn-outline-primary" (click)="emitSelect(entry)">
|
||||||
{{'resource-policies.form.eperson-group-list.select.btn' | translate}}
|
{{'resource-policies.form.eperson-group-list.select.btn' | translate}}
|
||||||
|
@@ -1751,6 +1751,8 @@
|
|||||||
|
|
||||||
"form.submit": "Save",
|
"form.submit": "Save",
|
||||||
|
|
||||||
|
"form.create": "Create",
|
||||||
|
|
||||||
"form.repeatable.sort.tip": "Drop the item in the new position",
|
"form.repeatable.sort.tip": "Drop the item in the new position",
|
||||||
|
|
||||||
|
|
||||||
@@ -3659,6 +3661,10 @@
|
|||||||
|
|
||||||
"resource-policies.form.eperson-group-list.table.headers.name": "Name",
|
"resource-policies.form.eperson-group-list.table.headers.name": "Name",
|
||||||
|
|
||||||
|
"resource-policies.form.eperson-group-list.table.headers.collcomm": "Collection/Community",
|
||||||
|
|
||||||
|
"resource-policies.form.eperson-group-list.table.headers.identity": "Identity",
|
||||||
|
|
||||||
"resource-policies.form.eperson-group-list.modal.header": "Cannot change type",
|
"resource-policies.form.eperson-group-list.modal.header": "Cannot change type",
|
||||||
|
|
||||||
"resource-policies.form.eperson-group-list.modal.text1.toGroup": "It is not possible to replace an ePerson with a group.",
|
"resource-policies.form.eperson-group-list.modal.text1.toGroup": "It is not possible to replace an ePerson with a group.",
|
||||||
@@ -3669,6 +3675,10 @@
|
|||||||
|
|
||||||
"resource-policies.form.eperson-group-list.modal.close": "Ok",
|
"resource-policies.form.eperson-group-list.modal.close": "Ok",
|
||||||
|
|
||||||
|
"resource-policies.form.eperson-group-list.cell.email": "Email: ",
|
||||||
|
|
||||||
|
"resource-policies.form.eperson-group-list.cell.netid": "NetID: ",
|
||||||
|
|
||||||
"resource-policies.form.date.end.label": "End Date",
|
"resource-policies.form.date.end.label": "End Date",
|
||||||
|
|
||||||
"resource-policies.form.date.start.label": "Start Date",
|
"resource-policies.form.date.start.label": "Start Date",
|
||||||
|
Reference in New Issue
Block a user