<a class="ml-2" href="javascript:;'" (click)="showFields='suggested'" i18n>Suggested Fields</a>
<a class="ml-2" href="javascript:;'" (click)="showFields='all'" i18n>All Fields</a>
-
-<ng-template #fieldLabel
- let-cls="cls" let-field="field" let-override="override">
+<ng-template #fieldLabel
+ let-cls="cls" let-field="field" let-overrideLabel="overrideLabel">
<div class="col-lg-3 field-label">
<label for="{{cls}}-{{field}}-input">
- {{getFieldLabel(cls, field, override)}}
+ {{getFieldLabel(cls, field, overrideLabel)}}
</label>
<!-- TODO doc links -->
</div>
</ng-template>
-<ng-template #fieldInput let-cls="cls" let-field="field"
+<ng-template #fieldInput let-cls="cls" let-field="field" let-overrideLabel="overrideLabel"
let-type="type" let-disabled="disabled" let-path="path">
+
+ <ng-container
+ *ngTemplateOutlet="fieldLabel; context:
+ {cls: cls, field: field, overrideLabel: overrideLabel}">
+ </ng-container>
+
<div class="col-lg-3">
<input
type="{{type || 'text'}}"
</div>
</ng-template>
-
<div class="mt-3 striped-rows-even patron-edit-container" *ngIf="patron">
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'ac', field: 'barcode'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context:
- {cls: 'ac', field: 'barcode', disabled: !patron.isnew(), path: 'card'}">
+ {cls: 'ac', field: 'barcode', path: 'card', disabled: !patron.isnew()}">
</ng-container>
</div>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'usrname'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'usrname'}">
</ng-container>
</div>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'passwd'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'passwd'}">
</ng-container>
<li ngbNavItem="primary">
<a ngbNavLink i18n>Primary Name</a>
<ng-template ngbNavContent>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'prefix'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'prefix'}">
</ng-container>
</div>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'first_given_name'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'first_given_name'}">
</ng-container>
</div>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'second_given_name'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'second_given_name'}">
</ng-container>
</div>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'family_name'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'family_name'}">
</ng-container>
</div>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'suffix'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'suffix'}">
</ng-container>
<li ngbNavItem="preferred">
<a ngbNavLink i18n>Preferred Name</a>
<ng-template ngbNavContent>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'pref_prefix'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'pref_prefix'}">
</ng-container>
</div>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'pref_first_given_name'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'pref_first_given_name'}">
</ng-container>
</div>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'pref_second_given_name'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'pref_second_given_name'}">
</ng-container>
</div>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'pref_family_name'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'pref_family_name'}">
</ng-container>
</div>
- <div class="row pt-1 pb-1 mt-2">
- <ng-container
- *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'pref_suffix'}">
- </ng-container>
+ <div class="row pt-1 pb-1 mt-1">
<ng-container
*ngTemplateOutlet="fieldInput; context: {cls: 'au', field: 'pref_suffix'}">
</ng-container>
</li>
</ul>
<div [ngbNavOutlet]="nameNav"></div>
- <hr class="m-2"/>
-
-
+ <div class="row pt-1 pb-1 mt-1">
+ <ng-container
+ *ngTemplateOutlet="fieldLabel; context: {cls: 'au', field: 'name_keywords'}">
+ </ng-container>
+ <div class="col-lg-3">
+ <textarea
+ class="form-control"
+ name="au-name_keywords-input"
+ id="au-name_keywords-input"
+ [ngModel]="objectFromPath(null)['name_keywords']()"
+ (ngModelChange)="fieldValueChange(null, 'name_keywords', $event)"
+ (change)="fieldMaybeModified(null, 'name_keywords')"
+ [required]="fieldRequired(cls, 'name_keywords')"
+ [pattern]="fieldPattern(cls, 'name_keywords')">
+ </textarea>
+ </div>
+ </div>
+ <div class="row pt-1 pb-1 mt-1">
+ <!-- example of overriding a field label -->
+ <eg-string #holdAliasString i18n-text text="Holds Alias"></eg-string>
+ <ng-container
+ *ngTemplateOutlet="fieldInput; context:
+ {cls: 'au', field: 'alias', overrideLabel: holdAliasString.text}">
+ </ng-container>
+ </div>
</div>