From f68c54cd3ad404d78e1256cdd02cd802ca6e21d9 Mon Sep 17 00:00:00 2001 From: garronej Date: Sun, 19 Jun 2022 23:30:05 +0200 Subject: [PATCH] #121 --- ..._object_to_js_code_declaring_an_object.ftl | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/src/bin/build-keycloak-theme/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl b/src/bin/build-keycloak-theme/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl index 5becdf62..11f926b8 100644 --- a/src/bin/build-keycloak-theme/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl +++ b/src/bin/build-keycloak-theme/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl @@ -155,33 +155,6 @@ ${ftl_object_to_js_code_declaring_an_object(.data_model, [])?no_esc}; - <#if key == "showUsername" && are_same_path(path, ["auth"])> - <#attempt> - <#return auth.showUsername()?c> - <#recover> - <#local out_seq += ["/*Couldn't evaluate auth.showUsername()*/"]> - <#continue> - - - - <#if key == "showResetCredentials" && are_same_path(path, ["auth"])> - <#attempt> - <#return auth.showResetCredentials()?c> - <#recover> - <#local out_seq += ["/*Couldn't evaluate auth.showResetCredentials()*/"]> - <#continue> - - - - <#if key == "showTryAnotherWayLink" && are_same_path(path, ["auth"])> - <#attempt> - <#return auth.showTryAnotherWayLink()?c> - <#recover> - <#local out_seq += ["/*Couldn't evaluate auth.showTryAnotherWayLink()*/"]> - <#continue> - - - <#attempt> <#if !object[key]??> <#continue> @@ -229,6 +202,31 @@ ${ftl_object_to_js_code_declaring_an_object(.data_model, [])?no_esc}; <#if isMethod> + + <#if are_same_path(path, ["auth", "showUsername"])> + <#attempt> + <#return auth.showUsername()?c> + <#recover> + <#return "ABORT: Couldn't evaluate auth.showUsername()"> + + + + <#if are_same_path(path, ["auth", "showResetCredentials"])> + <#attempt> + <#return auth.showResetCredentials()?c> + <#recover> + <#return "ABORT: Couldn't evaluate auth.showResetCredentials()"> + + + + <#if are_same_path(path, ["auth", "showTryAnotherWayLink"])> + <#attempt> + <#return auth.showTryAnotherWayLink()?c> + <#recover> + <#return "ABORT: Couldn't evaluate auth.showTryAnotherWayLink()"> + + + <#return "ABORT: It's a method">