Server IP : 162.213.251.212 / Your IP : 18.226.180.147 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/allssztx/public_html/easybuyer/resources/views/admin/ |
Upload File : |
<x-admin.header /> <x-admin.sidebar /> <style> .input-field .img-upload-btn { margin: 10px; } td.col-img { display: flex; } td.col-img h6 { position: relative; margin: 10px 0px 0px 10px !important; } </style> <main> <div class="main-content"> <div class="row"> <div class="col-lg-12 col-12"> <form id="AddConfigForm"> @csrf <div class="login-form form-content"> <h4>Add CMS</h4> <div class="input-field"> <label for="">Config Name</label> <div class="input-field"> <input class="custom-input" type="text" name="configName"> </div> </div> <div class="input-field"> <label for="">Config Description</label> <div class="input-field"> <textarea class="custom-input ckeditor" type="text" name="configDesc" id="configDesc"></textarea> </div> </div> <div class="input-field"> <label for="">Phone</label> <div class="input-field"> <input class="custom-input" type="text" name="configPhone"> </div> </div> <div class="input-field"> <label for="">Email</label> <div class="input-field"> <input class="custom-input" type="text" name="configEmail"> </div> </div> <div class="input-field"> <label for="">Location</label> <div class="input-field"> <input class="custom-input" type="text" name="configLocation"> </div> </div> <div class="input-field"> <label for="">Facebook</label> <div class="input-field"> <input class="custom-input" type="text" name="configFacebook"> </div> </div> <div class="input-field"> <label for="">Instagram</label> <div class="input-field"> <input class="custom-input" type="text" name="configInstagram"> </div> </div> <div class="input-field"> <label for="">LinkedIn</label> <div class="input-field"> <input class="custom-input" type="text" name="configLinkedIn"> </div> </div> <div class="input-field"> <label for="">Twitter</label> <div class="input-field"> <input class="custom-input" type="text" name="configTwitter"> </div> </div> <div class="input-field"> <label for="">Youtube</label> <div class="input-field"> <input class="custom-input" type="text" name="configYoutube"> </div> </div> <div class="input-field"> <label for="">Config Status</label> <div class="custom-switch checked"> <input checked type="checkbox" name="configStatus"> <span class="circle"></span> <span class="no"><i class="fa-light fa-xmark"></i></span> <span class="yes"><i class="fa-light fa-check"></i></span> </div> </div> <!-- <h6>* Required Fields</h6> --> <div class="form-footer"> <button type="submit">Add Config</button> </div> </div> </form> </div> </div> </div> <!-- Insert Config --> <script> $(document).ready(function(){ $("#AddConfigForm").on('submit', function(e){ e.preventDefault(); for ( instance in CKEDITOR.instances ) CKEDITOR.instances[instance].updateElement(); var data = new FormData(this); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); $.ajax({ url: "insert_config", method: "POST", data: data, datatype: "json", cache: false, contentType: false, processData: false, success:function(data) { if($.isEmptyObject(data.error)) { toastr.success(data.success,"Added",{timeOut: 1500}); document.getElementById('AddConfigForm').reset(); CKEDITOR.instances.configDesc.setData(""); } else if(data.error.configName) { toastr.error(data.error.configName,"Error",{timeOut: 1500}); return false; } // else if(data.error.configDesc) // { // toastr.error(data.error.configDesc,"Error",{timeOut: 1500}); // return false; // } }, error:function() { toastr.error("SomeThing Went Wrong...","Error"); return false; }, }); }); }); </script> <!-- Insert Config Ends Here --> <x-admin.footer />