Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ describe('EPersonFormComponent', () => {
],
},
email: email,
netid: null,
canLogIn: canLogIn,
requireCertificate: requireCertificate,
});
Expand Down Expand Up @@ -430,6 +431,7 @@ describe('EPersonFormComponent', () => {
],
},
email: email,
netid: undefined,
canLogIn: canLogIn,
requireCertificate: requireCertificate,
_links: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
firstName: DynamicInputModel;
lastName: DynamicInputModel;
email: DynamicInputModel;
netid: DynamicInputModel;
// booleans
canLogIn: DynamicCheckboxModel;
requireCertificate: DynamicCheckboxModel;
Expand Down Expand Up @@ -144,6 +145,11 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
host: 'row',
},
},
netid: {
grid: {
host: 'row',
},
},
canLogIn: {
grid: {
host: 'col col-sm-6 d-inline-block',
Expand Down Expand Up @@ -318,6 +324,12 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
},
hint: this.translateService.instant(`${this.messagePrefix}.emailHint`),
});
this.netid = new DynamicInputModel({
id: 'netid',
label: this.translateService.instant(`${this.messagePrefix}.netid`),
name: 'netid',
required: false,
});
this.canLogIn = new DynamicCheckboxModel(
{
id: 'canLogIn',
Expand All @@ -336,6 +348,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
this.firstName,
this.lastName,
this.email,
this.netid,
this.canLogIn,
this.requireCertificate,
];
Expand All @@ -351,6 +364,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
firstName: eperson != null ? eperson.firstMetadataValue('eperson.firstname') : '',
lastName: eperson != null ? eperson.firstMetadataValue('eperson.lastname') : '',
email: eperson != null ? eperson.email : '',
netid: eperson != null ? eperson.netid : '',
canLogIn: eperson != null ? eperson.canLogIn : true,
requireCertificate: eperson != null ? eperson.requireCertificate : false,
});
Expand Down Expand Up @@ -429,6 +443,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
],
},
email: this.email.value,
netid: this.netid.value,
canLogIn: this.canLogIn.value,
requireCertificate: this.requireCertificate.value,
};
Expand Down Expand Up @@ -486,6 +501,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
],
},
email: (hasValue(values.email) ? values.email : ePerson.email),
netid: (hasValue(values.netid) ? values.netid : ePerson.netid),
canLogIn: (hasValue(values.canLogIn) ? values.canLogIn : ePerson.canLogIn),
requireCertificate: (hasValue(values.requireCertificate) ? values.requireCertificate : ePerson.requireCertificate),
_links: ePerson._links,
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@

"admin.access-control.epeople.form.emailHint": "Must be a valid email address",

"admin.access-control.epeople.form.netid": "Net ID",

"admin.access-control.epeople.form.canLogIn": "Can log in",

"admin.access-control.epeople.form.requireCertificate": "Requires certificate",
Expand Down
Loading