<%_ 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 (fieldType == 'Integer' || fieldType == 'Long' || fieldType == 'Float' || fieldType == 'Double' || fieldType == 'BigDecimal') {
fieldInputType = 'number';
} else if (fieldType == 'LocalDate') {
fieldInputType = 'date';
} else if (fieldType == 'ZonedDateTime') {
fieldInputType = 'datetime-local';
} else if (fieldType == 'Boolean') {
fieldInputType = 'checkbox';
} else if ((fieldType == 'byte[]' || fieldType == 'ByteBuffer') && fieldTypeBlobContent != 'text') {
fieldInputType = 'hidden';
} _%>
ngf-drop ngf-change="vm.set<%=fieldNameCapitalized %>($file, vm.<%= entityInstance %>)"<% if (fieldTypeBlobContent == 'image') { %> ngf-pattern="'image/*'"<% } %><% } %>>
<%_ if (fields[idx].fieldIsEnum) { _%>
<%_ } else { _%>
<%_ if ((fieldType == 'byte[]' || fieldType === 'ByteBuffer') && fieldTypeBlobContent != 'text') { _%>
<%_ if (fieldTypeBlobContent == 'image') { _%>
![<%=entityInstance %> image]()
<%_ } _%>
<%_ if (fieldTypeBlobContent == 'any') { _%>
open
{{vm.<%= entityInstance %>.<%= fieldName %>ContentType}}, {{vm.byteSize(vm.<%= entityInstance %>.<%= fieldName %>)}}
<%_ } else { _%>
{{vm.<%= entityInstance %>.<%= fieldName %>ContentType}}, {{vm.byteSize(vm.<%= entityInstance %>.<%= fieldName %>)}}
<%_ } _%>
<%_ } _%>
<%_ if (fieldType == 'LocalDate') { _%>
/>
<%_ } else if(fieldType == 'ZonedDateTime') { _%>
/>
<%_ } else if(fieldType == 'Boolean') { _%>
<%_ } else if(fieldTypeBlobContent == 'text') { _%>
<%_ } else { _%>
/>
<%_ if ((fieldType == 'byte[]' || fieldType === 'ByteBuffer') && fieldTypeBlobContent != 'text') { _%>
<%_ } _%>
<%_ } _%>
<%_ } _%>
<%_ if (fields[idx].fieldValidate == true) { _%>
<%_ if (fields[idx].fieldValidateRules.indexOf('required') != -1) { _%>
This field is required.
<%_ } _%>
<%_ if (fields[idx].fieldValidateRules.indexOf('minlength') != -1) { _%>
This field is required to be at least <%= fields[idx].fieldValidateRulesMinlength %> characters.
<%_ } _%>
<%_ if (fields[idx].fieldValidateRules.indexOf('maxlength') != -1) { _%>
This field cannot be longer than <%= fields[idx].fieldValidateRulesMaxlength %> characters.
<%_ } _%>
<%_ if (fields[idx].fieldValidateRules.indexOf('min') != -1) { _%>
This field should be at least <%= fields[idx].fieldValidateRulesMin %>.
<%_ } _%>
<%_ if (fields[idx].fieldValidateRules.indexOf('max') != -1) { _%>
This field cannot be more than <%= fields[idx].fieldValidateRulesMax %>.
<%_ } _%>
<%_ if (fields[idx].fieldValidateRules.indexOf('minbytes') != -1) { _%>
This field should be at least <%= fields[idx].fieldValidateRulesMinbytes %>.
<%_ } _%>
<%_ if (fields[idx].fieldValidateRules.indexOf('maxbytes') != -1) { _%>
This field cannot be more than <%= fields[idx].fieldValidateRulesMaxbytes %>.
<%_ } _%>
<%_ if (fields[idx].fieldValidateRules.indexOf('pattern') != -1) { _%>
This field should follow pattern "<%= fields[idx].fieldValidateRulesPattern %>".
<%_ } _%>
<%_ if (fieldType == 'Integer' || fieldType == 'Long' || fieldType == 'Float' || fieldType == 'Double' || fieldType == 'BigDecimal') { _%>
This field should be a number.
<%_ } _%>
<%_ if (fieldType == 'ZonedDateTime') { _%>
This field should be a date and time.
<%_ } _%>
<%_ } _%>
<%_ } _%>
<%_ 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 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')) { _%>
<%_ if (dto == 'no') { _%>
<%_ } else { _%>
<%_ } _%>
<%_ } else if (relationshipType == 'one-to-one' && ownerSide == true) { _%>
<%_ if (dto == 'no') { _%>
<%_ } else { _%>
<%_ } _%>
<%_ } else if (relationshipType == 'many-to-many' && relationships[idx].ownerSide == true) { _%>
<%_ } _%>
<%_ if (relationships[idx].relationshipValidate == true) { _%>
<%_ if (relationshipRequired) { _%>
This field is required.
<%_ } _%>
<%_ } _%>
<%_ } _%>