70 lines
2.2 KiB
JavaScript
Vendored
70 lines
2.2 KiB
JavaScript
Vendored
|
|
$(document).ready(function() {
|
|
common_helper.formValidate('#payment-report_form',
|
|
{'card_number': 'required', 'expiry': 'required', 'cvv': 'required'},
|
|
{
|
|
'card_number': {required: "Please enter your card number"},
|
|
'expiry': {required: "Please enter expire date"},
|
|
'cvv': {required: "Please enter your card code"}
|
|
}
|
|
);
|
|
});
|
|
|
|
$('#popup_youtube').click(function (e) {
|
|
e.preventDefault();
|
|
common_helper.youtubePopup($("#popup_youtube"));
|
|
});
|
|
// const callbackfunction=(result)=>{
|
|
// if(result.status)
|
|
// {
|
|
// $('#confirmation_modal').modal('hide');
|
|
// @php
|
|
// unsetCache('card_'.auth()->id());
|
|
// unsetCache('expiration_'.auth()->id());
|
|
// unsetCache('cvv_'.auth()->id());
|
|
// @endphp
|
|
// window.location.href='{{route('manage.clients')}}';
|
|
//
|
|
// }
|
|
// }
|
|
|
|
// $('#btn-submit-form').click(function (e) {
|
|
// common_helper.globalAjaxRequestAsync('{{route('process.ajax')}}','POST',{action:'DELETE_RECURRING',id:null, _token:"{{ csrf_token() }}"},callbackfunction);
|
|
// });
|
|
|
|
$("#expiry").keyup(function(){
|
|
if ($(this).val().length === 2){
|
|
$(this).val($(this).val() + "/");
|
|
}
|
|
});
|
|
|
|
const subscription = () => {
|
|
event.preventDefault();
|
|
let message = 'Are you sure you want to cancel your account?'
|
|
commonModalView('COMMON_MODAL','confirmation_modal_subscription',message);
|
|
}
|
|
|
|
// const supportModalView=()=> {
|
|
// $('#support_modal').modal('show');
|
|
// }
|
|
|
|
|
|
// const profilePicModalView=()=> {
|
|
// debugger;
|
|
// $("#modal_target").load("/partials/modal/modal_views",
|
|
// function(){$("#profile_pic_modal").modal('show');});
|
|
// // $('#profile_pic_modal').modal('show');
|
|
// }
|
|
|
|
const modalviewcallback=(result,data)=>{
|
|
|
|
if(result){
|
|
|
|
$('#modal_target').html(result);
|
|
|
|
//This shows the modal
|
|
$('#'+ data.targetModal).modal('show');
|
|
}
|
|
}
|
|
|