diff --git a/entity/Address_entity/entityfields/is_standard/onValueChange.js b/entity/Address_entity/entityfields/is_standard/onValueChange.js new file mode 100644 index 0000000000000000000000000000000000000000..c4170ac0088bf8f2be38ca4e2370afe23318e9f9 --- /dev/null +++ b/entity/Address_entity/entityfields/is_standard/onValueChange.js @@ -0,0 +1,8 @@ +import("system.neon"); +import("system.logging"); +import("system.vars"); + +vars.set("$image.EditedStandardAddressId", vars.get("$field.ADDRESSID")); +neon.refresh("$sys.currentimage", "$field.OrgAddress_dfo");//TODO: refresh the correct DFO + +//TODO: store in database via onUpdate \ No newline at end of file diff --git a/entity/Address_entity/entityfields/is_standard/possibleItemsProcess.js b/entity/Address_entity/entityfields/is_standard/possibleItemsProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b429686afd550f89c5ea0f0c908cc3e17a5a9001 --- /dev/null +++ b/entity/Address_entity/entityfields/is_standard/possibleItemsProcess.js @@ -0,0 +1,7 @@ +import("system.translate"); +import("system.result"); + +result.object([ + ["true", translate.text("Standardadresse")] + ,["false", ""] +]); \ No newline at end of file diff --git a/entity/Address_entity/entityfields/is_standard/valueProcess.js b/entity/Address_entity/entityfields/is_standard/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..793e8ffb4806ecdafc6b81fbd37826483c175a65 --- /dev/null +++ b/entity/Address_entity/entityfields/is_standard/valueProcess.js @@ -0,0 +1,10 @@ +import("system.logging"); +import("system.vars"); +import("system.result"); + +var currentAddressId, changedAddressId; +currentAddressId = vars.get("$field.ADDRESSID"); +if (vars.exists("$image.EditedStandardAddressId")){ + changedAddressId = vars.get("$image.EditedStandardAddressId"); +} +result.string((changedAddressId ? changedAddressId : vars.get("$param.StandardAddressId_param")) == currentAddressId); \ No newline at end of file diff --git a/entity/Org_entity/entityfields/orgaddress_dfo/children/standardaddressid_param/code.js b/entity/Org_entity/entityfields/orgaddress_dfo/children/standardaddressid_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..d42e61e0686428e56877e4c33892f3953de8cb6f --- /dev/null +++ b/entity/Org_entity/entityfields/orgaddress_dfo/children/standardaddressid_param/code.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); + +var addressId = vars.get("$field.ADDRESS_ID"); +result.string(addressId); \ No newline at end of file