Add default bible translation and set it as the default in Bible References

This commit is contained in:
meichthys 2025-11-14 04:27:45 +00:00
parent 1fbfa9268e
commit 39d984db40
2 changed files with 16 additions and 2 deletions

View File

@ -8,6 +8,7 @@
"field_order": [
"legal_name",
"founding_date",
"default_bible_translation",
"column_break_rmsm",
"address",
"mission_statement",
@ -49,13 +50,19 @@
{
"fieldname": "section_break_nxne",
"fieldtype": "Section Break"
},
{
"fieldname": "default_bible_translation",
"fieldtype": "Link",
"label": "Default Bible Translation",
"options": "Church Bible Translation"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2025-11-11 00:18:40.476128",
"modified": "2025-11-13 22:57:23.998706",
"modified_by": "Administrator",
"module": "Church Foundations",
"name": "Church Information",

View File

@ -33,7 +33,14 @@ frappe.ui.form.on("Church Bible Reference", {
console.error(error);
}
});
}
// Set default translation if not set
frappe.db.get_single_value('Church Information', 'default_bible_translation')
.then(function (value) {
if (!frm.doc.translation) {
frm.set_value('translation', value);
}
})
}
});
async function fetch_bible_text(frm) {