From fa4950d254aadbe0ee47e1a442f9854ef534faed Mon Sep 17 00:00:00 2001 From: Ramon Gutierrez Date: Fri, 12 Jan 2018 08:57:46 +0800 Subject: [PATCH] Continue work on customer form template --- templates/customer/form.html.twig | 91 ++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/templates/customer/form.html.twig b/templates/customer/form.html.twig index d92c20d9..b36ac66e 100644 --- a/templates/customer/form.html.twig +++ b/templates/customer/form.html.twig @@ -65,7 +65,37 @@
- +
+
+
+
+
+
+
+ + + Use the format 63xxxxxxxxxx +
+
+
+ + + + +
+
+
+
+ + + + +
+
+
+ +
+
@@ -154,6 +184,65 @@ $("[data-field]").removeClass('has-danger'); $(".form-control-feedback[data-field]").addClass('hide'); } + + // datetimepicker + $(".datetimepicker").datetimepicker({ + format: "dd MM yyyy - HH:ii P", + showMeridian: true, + todayHighlight: true, + autoclose: true, + pickerPosition: 'bottom-left' + }); + + // data tables + var options = { + data: { + type: 'local', + source: vehicleRows, + saveState: { + cookie: false, + webstorage: false + } + }, + layout: { + scroll: true + }, + columns: [ + { + field: 'id', + title: 'ID', + width: 30 + }, + { + field: 'mfg_name', + title: 'Manufacturer' + }, + { + field: 'make', + title: 'Make' + }, + { + field: 'model_year_from', + title: 'Year', + template: function (data) { + return data.model_year_from + ' - ' + data.model_year_to; + } + }, + { + field: 'Actions', + width: 70, + title: 'Actions', + sortable: false, + overflow: 'visible', + template: function (row, index, datatable) { + return ''; + }, + } + ], + pagination: false + }; + + var table = $("#data-vehicles").mDatatable(options); }); {% endblock %}