From 147e949aff3df08658b1b2e58f2d9424a39f8f2c Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Mon, 17 Feb 2020 15:25:12 +0800 Subject: [PATCH] Add initial UI for service charge support in one step job order form #341 --- .../job-order/cmb.form.onestep.html.twig | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/templates/job-order/cmb.form.onestep.html.twig b/templates/job-order/cmb.form.onestep.html.twig index 34fe7af4..08d20ee3 100644 --- a/templates/job-order/cmb.form.onestep.html.twig +++ b/templates/job-order/cmb.form.onestep.html.twig @@ -477,6 +477,38 @@ +
+
+
+

+ Service Charges +

+
+
+
+ +
+
+
+
+
+ + +
+
+
+ +
+
+ +
+
+
+
@@ -1607,6 +1639,41 @@ $(function() { }); }); }); + + // service charge add + $('#btn-sc-add').click(function(e) { + console.log('adding service charge'); + // add dropdown before the button + var html = '
'; + html += '
'; + html += '
'; + html += ''; + html += ''; + html += '
'; + html += '
'; + html += '
'; + html += ''; + html += '
'; + html += '
'; + html += ''; + html += '
'; + html += '
'; + + $('#sc-section').append(html); + return false; + }); + + // service charge remove + $('body').on('click', '.btn-sc-remove', function(e) { + console.log('removing service charge'); + + $(this).closest('.row').remove(); + return false; + }); }); {% endblock %}