I'm trying to open two forms (Notas and Adjuntos) from a drop-down menu, but when I do, I get a message saying: error loading the form.
I extracted the code from the nuhome form and adapted it as shown below:
Code: Select all
function nuHomeOpenForm(f, r, event) {
n = event.ctrlKey ? '2': '0';
nuForm(f, r, '', '', n);
}
function nuHomeOpenMenu(event, menu, element) {
event.stopPropagation();
ctxmenu.show(menu, element);
}
function nuHomeOpenCreateMenuConfig(menuType, event) {
const baseMenus = {
Accion: [
{ text: nuContextMenuItemText("Guardar", "far fa-save"), action: () => nuSaveAction() },
{ text: nuContextMenuItemText("Nuevo", "far fa-edit"), action: () => nuHomeOpenForm('Notas', '', event) },
{ text: nuContextMenuItemText("Adjuntar", "fas fa-paperclip"), action: () => nuHomeOpenForm('Adjuntos', '', event) }
]
};
if (menuType === 'Database' && nuSERVERRESPONSE.is_demo) {
baseMenus.Database = baseMenus.Database.filter(item => item.text !== "Sessions");
}
const menu = [{ text: nuTranslate(menuType) }, ...baseMenus[menuType]];
return menu;
}
function nuHomeMenuClick(element, event, menuType) {
const menu = nuHomeOpenCreateMenuConfig(menuType, event);
nuHomeOpenMenu(event, menu, element);
}
Could you help me?... Thank you so much in advance.
