Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/../css/./../././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
مشاهدة ملف: settings.js
"use strict";
$validate = $('#profile_form').validate({
rules: {
email: {
required: true,
email: true,
},
u_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"
},
u_name: {required: "Please provide your 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');
}
});
$(document).ready(function () {
bsCustomFileInput.init();
});
$('#gateway').select2({
multiple:false
}).on('change', function (e) {
e.preventDefault();
const type = $(this).val();
$('.api-section').hide();
$('#' + type + "_section").show();
});
$('#timezone').select2();
$('#submit_api').on('click', function (e) {
e.preventDefault();
const form = $('#api_form').serialize();
$.ajax({
method: 'post',
url: '/admin/settings/update/api',
data: form,
success: function (res) {
if (res.status == 'success') {
notify('success', res.message);
}
}
})
});
if(paymentGateway) {
$('#submit_payment_gateway').on('click', function (e) {
e.preventDefault();
const form = $('#payment_gateway_form');
const formData = form.serialize();
const url = form.attr('action');
$.ajax({
method: 'post',
url: url,
data: formData,
success: function (res) {
if (res.status == 'success') {
notify('success', res.message);
}
else{
notify('danger', res.message);
}
}
})
});
}