diff --git a/templates/ktcore/document/add.smarty b/templates/ktcore/document/add.smarty index 181def1..5e5830e 100644 --- a/templates/ktcore/document/add.smarty +++ b/templates/ktcore/document/add.smarty @@ -1,16 +1,12 @@ - - - -{literal} - +function document_type_changed() { + typeselect = getElement('add-document-type'); + getMetadataForType(typeselect.value); +} + +function startupMetadata() { + typeselect = getElement('add-document-type'); + addToCallStack(typeselect, "onchange", document_type_changed, false); + document_type_changed(); +} + +addLoadEvent(startupMetadata); {/literal} +{/capture} +{$context->oPage->requireJSStandalone($sJavascript)} -