Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/./././../js/././admin/.
الملفات الموجودة في هذا الـ Path:
.
..
addon.js
customer.js
dashboard.js
faqs.js
front_contact.js
lead.js
pages.js
plan.js
servers.js
settings.js
tax.js
ticket.js
مشاهدة ملف: customer.js
"use strict";
$('#customers').DataTable({
processing: true,
serverSide: true,
responsive:true,
ajax:'/admin/customer/all',
columns: [
{ "data": "full_name" },
{ "data": "email","name":"customers.email" },
{ "data": "status" },
{ "data": "action" },
]
});
// console.log($validate);
if(customer) {
$('#customerForm').validate({
rules: {
email: {
required: true,
email: true,
},
first_name: {
required: true
},
last_name: {
required: true
},
},
messages: {
email: {
required: "Please enter a email address",
email: "Please enter a vaild email address"
},
password: {
required: "Please provide a password",
minlength: "Your password must be at least 5 characters long"
},
first_name: {required: "Please provide first name"},
last_name: {required: "Please provide last name"}
},
errorElement: 'span',
errorPlacement: function (error, element) {
error.addClass('invalid-feedback');
element.closest('.form-group').append(error);
},
highlight: function (element, errorClass, validClass) {
$(element).addClass('is-invalid');
},
unhighlight: function (element, errorClass, validClass) {
$(element).removeClass('is-invalid');
}
});
}else{
$('#customerForm').validate({
rules: {
email: {
required: true,
email: true,
},
password: {
required: true,
minlength: 5
},
first_name: {
required: true
},
last_name: {
required: true
},
},
messages: {
email: {
required: "Please enter a email address",
email: "Please enter a vaild email address"
},
password: {
required: "Please provide a password",
minlength: "Your password must be at least 5 characters long"
},
first_name: { required:"Please provide first name"},
last_name: { required:"Please provide last name"}
},
errorElement: 'span',
errorPlacement: function (error, element) {
error.addClass('invalid-feedback');
element.closest('.form-group').append(error);
},
highlight: function (element, errorClass, validClass) {
$(element).addClass('is-invalid');
},
unhighlight: function (element, errorClass, validClass) {
$(element).removeClass('is-invalid');
}
});
}