<div id="paymentcontainer" class="boxframe"></div>
<script>
const {currentLanguage, createInstanceChildText} = await import('./' + CLIENT_MODULES_PATH + 'languages.mjs');
const paymentsMother= new thisNode.constructor.linkerConstructor("PaymentTypes");
await paymentsMother.loadRequest("get my tree", {extraParents: currentLanguage.getRelationship("paymenttypesdata")});

paymentsMother.addEventListener("setChildrenView", async function() {
  if (webuser.isSystemAdmin() && this.children.length==0) {
    const newNode = await createInstanceChildText(text)
    newNode.setView(this.childContainer, "butaddnewnode");
  }
}, "addNewNodeButton");
paymentsMother.setChildrenView(thisElement,  "paymenttype");
</script>