<<%= jhiPrefixDashed %>-alert-error><%= jhiPrefixDashed %>-alert-error>
.id">
ID
.id" readonly />
<%_ for (idx in fields) {
const fieldName = fields[idx].fieldName;
const fieldNameCapitalized = fields[idx].fieldNameCapitalized;
const fieldNameHumanized = fields[idx].fieldNameHumanized;
const fieldType = fields[idx].fieldType;
const fieldTypeBlobContent = fields[idx].fieldTypeBlobContent;
let fieldInputType = 'text';
let ngModelOption = '';
const translationKey = keyPrefix + fieldName;
if (['Integer', 'Long', 'Float', 'Double', 'BigDecimal'].includes(fieldType)) {
fieldInputType = 'number';
} else if (fieldType === 'LocalDate') {
fieldInputType = 'date';
} else if (['Instant', 'ZonedDateTime'].includes(fieldType)) {
fieldInputType = 'datetime-local';
} else if (fieldType === 'Boolean') {
fieldInputType = 'checkbox';
} else if (['byte[]', 'ByteBuffer'].includes(fieldType) && fieldTypeBlobContent !== 'text') {
fieldInputType = 'hidden';
}
_%>
<%_ if (fields[idx].fieldValidate === true) { _%>
<%_ } _%>
<%_ } _%>
<%_ for (idx in relationships) {
const relationshipType = relationships[idx].relationshipType;
const ownerSide = relationships[idx].ownerSide;
const otherEntityName = relationships[idx].otherEntityName;
const otherEntityNamePlural = relationships[idx].otherEntityNamePlural;
const otherEntityNameCapitalized = relationships[idx].otherEntityNameCapitalized;
const relationshipName = relationships[idx].relationshipName;
const relationshipNameHumanized = relationships[idx].relationshipNameHumanized;
const relationshipFieldName = relationships[idx].relationshipFieldName;
const relationshipFieldNamePlural = relationships[idx].relationshipFieldNamePlural;
const otherEntityField = relationships[idx].otherEntityField;
const otherEntityFieldCapitalized = relationships[idx].otherEntityFieldCapitalized;
const relationshipRequired = relationships[idx].relationshipRequired;
const translationKey = keyPrefix + relationshipName; _%>
<%_ if (relationshipType === 'many-to-one' || (relationshipType === 'one-to-one' && ownerSide === true && otherEntityName === 'user')) { _%>
<%= relationshipNameHumanized %>
<%_ if (dto === 'no') { _%>
.<%=relationshipFieldName %>" <% if (relationshipRequired) { %> required<% } %>>
<%_ if (!relationshipRequired) { _%>
<%_ } else { _%>
" [ngValue]="null" selected>
<%_ } _%>
Option.id === <%= entityInstance %>.<%=relationshipFieldName %>?.id ? <%= entityInstance %>.<%=relationshipFieldName %> : <%=otherEntityName %>Option" *ngFor="let <%=otherEntityName %>Option of <%=otherEntityNamePlural.toLowerCase() %>; trackBy: track<%=otherEntityNameCapitalized %>ById">{{<%=otherEntityName %>Option.<%=otherEntityField %>}}
<%_ } else { _%>
.<%=relationshipFieldName %>Id" <% if (relationshipRequired) { %> required<% } %>>
<%_ if (!relationshipRequired) { _%>
<%_ } else { _%>
" [ngValue]="null" selected>
<%_ } _%>
Option.id" *ngFor="let <%=otherEntityName %>Option of <%=otherEntityNamePlural.toLowerCase() %>; trackBy: track<%=otherEntityNameCapitalized %>ById">{{<%=otherEntityName %>Option.<%=otherEntityField %>}}
<%_ } _%>
<%_ } else if (relationshipType === 'one-to-one' && ownerSide === true) { _%>
<%= relationshipNameHumanized %>
<%_ if (dto === 'no') { _%>
.<%=relationshipFieldName %>"<% if (relationshipRequired) { %> required<% } %>>
<%_ if (!relationshipRequired) { _%>
<%_ } else { _%>
" [ngValue]="null" selected>
<%_ } _%>
Option.id === <%= entityInstance %>.<%=relationshipFieldName %>?.id ? <%= entityInstance %>.<%=relationshipFieldName %> : <%=otherEntityName %>Option" *ngFor="let <%=otherEntityName %>Option of <%=relationshipFieldNamePlural.toLowerCase() %>; trackBy: track<%=otherEntityNameCapitalized %>ById">{{<%=otherEntityName %>Option.<%=otherEntityField %>}}
<%_ } else { _%>
.<%=relationshipFieldName %>Id"<% if (relationshipRequired) { %> required<% } %>>
<%_ if (!relationshipRequired) { _%>
<%_ } else { _%>
" [ngValue]="null" selected>
<%_ } _%>
Option.id" *ngFor="let <%=otherEntityName %>Option of <%=relationshipFieldNamePlural.toLowerCase() %>; trackBy: track<%=otherEntityNameCapitalized %>ById">{{<%=otherEntityName %>Option.<%=otherEntityField %>}}
<%_ } _%>
<%_ } else if (relationshipType === 'many-to-many' && relationships[idx].ownerSide === true) { _%>
<%= relationshipNameHumanized %>
.<%=relationshipFieldNamePlural %>"<% if (relationshipRequired) { %> required<% } %>>
.<%=relationshipFieldNamePlural %>, <%=otherEntityName %>Option)" *ngFor="let <%=otherEntityName %>Option of <%=otherEntityNamePlural.toLowerCase() %>; trackBy: track<%=otherEntityNameCapitalized %>ById">{{<%=otherEntityName %>Option.<%=otherEntityField %>}}
<%_ } _%>
<%_ if (relationships[idx].relationshipValidate === true) { _%>
?.dirty && editForm.controls.<%= relationshipName %>?.invalid)">
<%_ if (relationshipRequired) { _%>
?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
<%_ } _%>
<%_ } _%>
<%_ } _%>