fmt (changelog ignore)
This commit is contained in:
parent
bd403beb5c
commit
4ad3affadb
@ -138,59 +138,59 @@
|
||||
<#assign fieldNames = ["global", "userLabel", "username", "email", "firstName", "lastName", "password", "password-confirm"]>
|
||||
|
||||
<#attempt>
|
||||
<#list profile.attributes as attribute>
|
||||
<#list profile.attributes as attribute>
|
||||
<#assign fieldNames += [attribute.name]>
|
||||
</#list>
|
||||
</#list>
|
||||
<#recover>
|
||||
</#attempt>
|
||||
|
||||
"printIfExists": function (fieldName, x) {
|
||||
<#list fieldNames as fieldName>
|
||||
if(fieldName === "${fieldName}" ){
|
||||
<#list fieldNames as fieldName>
|
||||
if(fieldName === "${fieldName}" ){
|
||||
<#attempt>
|
||||
return "${messagesPerField.printIfExists(fieldName,'1')}" ? x : undefined;
|
||||
<#recover>
|
||||
</#attempt>
|
||||
}
|
||||
</#list>
|
||||
throw new Error("There is no " + fieldName " field");
|
||||
</#list>
|
||||
throw new Error("There is no " + fieldName " field");
|
||||
},
|
||||
"existsError": function (fieldName) {
|
||||
<#list fieldNames as fieldName>
|
||||
if(fieldName === "${fieldName}" ){
|
||||
<#list fieldNames as fieldName>
|
||||
if(fieldName === "${fieldName}" ){
|
||||
<#attempt>
|
||||
return <#if messagesPerField.existsError('${fieldName}')>true<#else>false</#if>;
|
||||
return <#if messagesPerField.existsError('${fieldName}')>true<#else>false</#if>;
|
||||
<#recover>
|
||||
</#attempt>
|
||||
}
|
||||
</#list>
|
||||
throw new Error("There is no " + fieldName " field");
|
||||
</#list>
|
||||
throw new Error("There is no " + fieldName " field");
|
||||
},
|
||||
"get": function (fieldName) {
|
||||
<#list fieldNames as fieldName>
|
||||
if(fieldName === "${fieldName}" ){
|
||||
<#list fieldNames as fieldName>
|
||||
if(fieldName === "${fieldName}" ){
|
||||
<#attempt>
|
||||
<#if messagesPerField.existsError('${fieldName}')>
|
||||
if(fieldName === "${fieldName}" ){
|
||||
return "${messagesPerField.get('${fieldName}')?no_esc}";
|
||||
}
|
||||
</#if>
|
||||
<#if messagesPerField.existsError('${fieldName}')>
|
||||
if(fieldName === "${fieldName}" ){
|
||||
return "${messagesPerField.get('${fieldName}')?no_esc}";
|
||||
}
|
||||
</#if>
|
||||
<#recover>
|
||||
</#attempt>
|
||||
}
|
||||
</#list>
|
||||
throw new Error("There is no " + fieldName " field");
|
||||
},
|
||||
</#list>
|
||||
throw new Error("There is no " + fieldName " field");
|
||||
},
|
||||
"exists": function (fieldName) {
|
||||
<#list fieldNames as fieldName>
|
||||
if(fieldName === "${fieldName}" ){
|
||||
<#list fieldNames as fieldName>
|
||||
if(fieldName === "${fieldName}" ){
|
||||
<#attempt>
|
||||
return <#if messagesPerField.exists('${fieldName}')>true<#else>false</#if>;
|
||||
return <#if messagesPerField.exists('${fieldName}')>true<#else>false</#if>;
|
||||
<#recover>
|
||||
</#attempt>
|
||||
}
|
||||
</#list>
|
||||
throw new Error("There is no " + fieldName " field");
|
||||
</#list>
|
||||
throw new Error("There is no " + fieldName " field");
|
||||
}
|
||||
},
|
||||
"msg": function(){ throw new Error("use import { useKcMessage } from 'keycloakify'"); },
|
||||
|
Loading…
x
Reference in New Issue
Block a user