LP1807523: Associating labels and inputs in angular fmeditor
[Evergreen.git] / Open-ILS / src / eg2 / src / app / share / fm-editor / fm-editor.component.html
index 721423c..bcd995d 100644 (file)
@@ -30,6 +30,7 @@
             <input *ngIf="field.datatype == 'id' && pkeyIsEditable"
               class="form-control"
               name="{{field.name}}"
+              id="rec-{{field.name}}"
               placeholder="{{field.label}}..."
               i18n-placeholder
               [readonly]="field.readOnly"
@@ -40,6 +41,7 @@
             <input *ngIf="field.datatype == 'text' || field.datatype == 'interval'"
               class="form-control"
               name="{{field.name}}"
+              id="rec-{{field.name}}"
               placeholder="{{field.label}}..."
               i18n-placeholder
               [readonly]="field.readOnly"
@@ -49,6 +51,7 @@
 
             <span *ngIf="field.datatype == 'timestamp'">
               <eg-date-select
+                domId="rec-{{field.name}}"
                 (onChangeAsIso)="record[field.name]($event)"
                 initialIso="{{record[field.name]()}}">
               </eg-date-select>
@@ -58,6 +61,7 @@
               class="form-control"
               type="number"
               name="{{field.name}}"
+              id="rec-{{field.name}}"
               placeholder="{{field.label}}..."
               i18n-placeholder
               [readonly]="field.readOnly"
@@ -69,6 +73,7 @@
               class="form-control"
               type="number" step="0.1"
               name="{{field.name}}"
+              id="rec-{{field.name}}"
               placeholder="{{field.label}}..."
               i18n-placeholder
               [readonly]="field.readOnly"
@@ -82,6 +87,7 @@
                 class="form-control"
                 type="number" step="0.1"
                 name="{{field.name}}"
+                id="rec-{{field.name}}"
                 [readonly]="field.readOnly"
                 [required]="field.isRequired()"
                 [ngModel]="record[field.name]() | currency"/>
@@ -90,6 +96,7 @@
                 class="form-control"
                 type="number" step="0.1"
                 name="{{field.name}}"
+                id="rec-{{field.name}}"
                 placeholder="{{field.label}}..."
                 i18n-placeholder
                 [readonly]="field.readOnly"
               class="form-check-input"
               type="checkbox"
               name="{{field.name}}"
+              id="rec-{{field.name}}"
               [readonly]="field.readOnly"
               [ngModel]="record[field.name]()"
               (ngModelChange)="record[field.name]($event)"/>
               <select
                 class="form-control"
                 name="{{field.name}}"
+                id="rec-{{field.name}}"
                 [disabled]="field.readOnly"
                 [required]="field.isRequired()"
                 [ngModel]="record[field.name]()"
             <eg-org-select *ngIf="field.datatype == 'org_unit'"
               placeholder="{{field.label}}..."
               i18n-placeholder
+              domId="rec-{{field.name}}"
               [limitPerms]="modePerms[mode]"
               [applyDefault]="field.orgDefaultAllowed"
               [initialOrgId]="record[field.name]()"