<%_ for (idx in fields) {
var fieldName = fields[idx].fieldName;
var fieldNameCapitalized = fields[idx].fieldNameCapitalized;
var fieldNameHumanized = fields[idx].fieldNameHumanized;
var fieldType = fields[idx].fieldType;
var fieldTypeBlobContent = fields[idx].fieldTypeBlobContent;
var fieldInputType = 'text';
var ngModelOption = '';
var 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') { _%>
![]()
<%_ } _%>
<%_ 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(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 more than <%= 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 more than <%= 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) {
var relationshipType = relationships[idx].relationshipType;
var ownerSide = relationships[idx].ownerSide;
var otherEntityName = relationships[idx].otherEntityName;
var otherEntityNamePlural = relationships[idx].otherEntityNamePlural;
var relationshipName = relationships[idx].relationshipName;
var relationshipNameHumanized = relationships[idx].relationshipNameHumanized;
var relationshipFieldName = relationships[idx].relationshipFieldName;
var relationshipFieldNamePlural = relationships[idx].relationshipFieldNamePlural;
var otherEntityField = relationships[idx].otherEntityField;
var otherEntityFieldCapitalized = relationships[idx].otherEntityFieldCapitalized;
var relationshipRequired = relationships[idx].relationshipRequired;
var 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.
<%_ } _%>
<%_ } _%>
<%_ } _%>