Skip to content
Snippets Groups Projects
Commit 1ca0b1a4 authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

contact: preset language in "new contact"-action

parent 42b63e73
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,8 @@
<title>Language</title>
<consumer>Languages</consumer>
<mandatory v="true" />
<valueProcess>%aditoprj%/entity/Contact_entity/entityfields/language/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Contact_entity/entityfields/language/displayValueProcess.js</displayValueProcess>
</entityField>
<entityConsumer>
<name>Languages</name>
......@@ -189,6 +191,12 @@
</entityParameter>
</children>
</entityConsumer>
<entityParameter>
<name>LanguageKey_param</name>
<valueProcess>%aditoprj%/entity/Contact_entity/entityfields/languagekey_param/valueProcess.js</valueProcess>
<expose v="true" />
<description>PARAMETER</description>
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.result");
import("system.vars");
import("Keyword_lib");
var key = vars.get("$field.LANGUAGE");
if (key)
{
var res = LanguageKeywordUtils.getViewValue(key);
result.string(res);
}
import("system.vars");
import("system.result");
var key = vars.get("$param.LanguageKey_param");
result.string(key);
\ No newline at end of file
import("system.result");
result.string("deu");
\ No newline at end of file
......@@ -725,6 +725,10 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<name>OwnContactId_param</name>
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/othercontacts/children/owncontactid_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>LanguageKey_param</name>
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/othercontacts/children/languagekey_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityField>
......
import("system.result");
import("system.vars");
var res = vars.get("$field.LANGUAGE");
result.string(res);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment