diff --git a/frontend/src/pages/BatchForm.vue b/frontend/src/pages/BatchForm.vue
index a1632386..e06579cc 100644
--- a/frontend/src/pages/BatchForm.vue
+++ b/frontend/src/pages/BatchForm.vue
@@ -13,15 +13,14 @@
-
-
-
-
+
+
+
-
-
-
-
- (batch.batch_details = val)"
- :editable="true"
- :fixedMenu="true"
- editorClass="prose-sm max-w-none border-b border-x bg-surface-gray-2 rounded-b-md py-1 px-2 min-h-[7rem] mb-4"
- />
-
-
-
+
+
{{ __('Date and Time') }}
@@ -133,6 +110,14 @@
class="mb-4"
:required="true"
/>
+
-
-
+
+
{{ __('Settings') }}
@@ -179,6 +157,11 @@
type="date"
class="mb-4"
/>
+
+
+
+
+ {{ __('Description') }}
+
+
+
+
+ (batch.batch_details = val)"
+ :editable="true"
+ :fixedMenu="true"
+ editorClass="prose-sm max-w-none border-b border-x bg-surface-gray-2 rounded-b-md py-1 px-2 min-h-[7rem] mb-4"
+ />
+
+
@@ -278,6 +288,7 @@ const batch = reactive({
end_time: '',
timezone: '',
evaluation_end_date: '',
+ confirmation_email_template: '',
seat_count: '',
medium: '',
category: '',
diff --git a/lms/lms/doctype/lms_batch/lms_batch.json b/lms/lms/doctype/lms_batch/lms_batch.json
index eb450285..c4de7840 100644
--- a/lms/lms/doctype/lms_batch/lms_batch.json
+++ b/lms/lms/doctype/lms_batch/lms_batch.json
@@ -17,16 +17,17 @@
"start_time",
"end_time",
"timezone",
- "section_break_rgfj",
- "medium",
- "category",
- "column_break_flwy",
- "seat_count",
- "evaluation_end_date",
"section_break_6",
"description",
"column_break_hlqw",
"instructors",
+ "section_break_rgfj",
+ "medium",
+ "category",
+ "confirmation_email_template",
+ "column_break_flwy",
+ "seat_count",
+ "evaluation_end_date",
"meta_image",
"section_break_khcn",
"batch_details",
@@ -318,6 +319,12 @@
{
"fieldname": "section_break_khcn",
"fieldtype": "Section Break"
+ },
+ {
+ "fieldname": "confirmation_email_template",
+ "fieldtype": "Link",
+ "label": "Confirmation Email Template",
+ "options": "Email Template"
}
],
"index_web_pages_for_search": 1,
@@ -335,7 +342,7 @@
"link_fieldname": "batch_name"
}
],
- "modified": "2025-02-12 11:59:35.312487",
+ "modified": "2025-02-17 17:48:12.949392",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Batch",
diff --git a/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py b/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py
index 8fd3124c..8de7715e 100644
--- a/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py
+++ b/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py
@@ -79,13 +79,20 @@ def send_mail(doc):
batch = frappe.db.get_value(
"LMS Batch",
doc.batch,
- ["name", "title", "start_date", "start_time", "medium"],
+ [
+ "name",
+ "title",
+ "start_date",
+ "start_time",
+ "medium",
+ "confirmation_email_template",
+ ],
as_dict=1,
)
subject = _("Enrollment Confirmation for {0}").format(batch.title)
template = "batch_confirmation"
- custom_template = frappe.db.get_single_value(
+ custom_template = batch.confirmation_email_template or frappe.db.get_single_value(
"LMS Settings", "batch_confirmation_template"
)