diff --git a/church/church_foundations/doctype/church_information/church_information.json b/church/church_foundations/doctype/church_information/church_information.json index 0676c24..bf5d7e1 100644 --- a/church/church_foundations/doctype/church_information/church_information.json +++ b/church/church_foundations/doctype/church_information/church_information.json @@ -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", diff --git a/church/church_study/doctype/church_bible_reference/church_bible_reference.js b/church/church_study/doctype/church_bible_reference/church_bible_reference.js index 9164287..7d1b7f6 100644 --- a/church/church_study/doctype/church_bible_reference/church_bible_reference.js +++ b/church/church_study/doctype/church_bible_reference/church_bible_reference.js @@ -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) {