Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: altapi.js
$(document).ready(function() { function validate() { var errors = ''; if ($("#altAPIId").val() == '0') errors = "-Please select Alternate API<br />"; if ($("#altSrvcId").val() == '0') errors += "- Please select API Service"; if (errors=='') return true; else { showStickyErrorToast(errors, BE_ERR, 'error'); return false; } } function getAPIServices() { $('#altImgLdr').ajaxStart(function() { $('#altImgLdr').show(); }).ajaxStop(function() { $('#altImgLdr').hide(); }); $.post(baseurl+apanel_name+"/services/ajxpackage", { apiId:$("#altAPIId").val(), serviceType:$("#sc").val(), purpose:'getsuppliersrvcs' }, function(response){ if(response) { $("#altSrvcId").html(response); } }); } $("#altAPIId").change(function() { getAPIServices(); }); $("#btnSave").click(function() { if(validate()) { $('#dvLoader').ajaxStart(function() { $(this).show(); }).ajaxStop(function() { $(this).hide(); }); $.post(baseurl+apanel_name+"/services/ajxaltapi", { id:$('#myServiceId').val(), sc:$('#sc').val(), apiId:$("#altAPIId").val(), srvcId:$("#altSrvcId").val(), altAPISrvcId:$("#altAPISrvcId").val(), purpose:'save' }, function(response){ if(response) { var arrResponse = response.split('|'); if(arrResponse[1] == '0') showStickyErrorToast(arrResponse[0], '', 'error'); if(arrResponse[1] == '1') { var service_page = 'package'; showStickyErrorToast(arrResponse[0], '', 'success'); if($('#sc').val()<2){ service_page = 'package'; }else{ service_page = 'serverservice'; } window.location.href = baseurl+apanel_name+'/services/'+service_page+'?id='+$('#myServiceId').val()+'&fs='+$('#sc').val()+'&jd=1&activeTab=2'; } } }); } }); });