$(function(){function e(s,t,o){$(s).on("click",'button[type="submit"]',{passive:!0},function(e){e.preventDefault();e=$(t).val();$.ajax({url:"includes/post_settings.php",method:"POST",data:{formId:s,newValue:e},success:function(e){$(s)[0].reset(),$(s).find(".form-control").removeClass("is-invalid"),$(s).find(".invalid-feedback").hide(),$(".success-message").text(o),$(".toast").toast("show"),$(s).closest(".modal").modal("hide"),setTimeout(function(){location.reload()},1500)},error:function(){alert("An error occurred while updating the setting.")}})})}e("#editUsernameForm","#newUsername","Username updated successfully."),e("#editNameForm","#newName","Name updated successfully."),e("#editAvatarForm","#newAvatar","Avatar updated successfully."),e("#editPasswordForm","#newPassword","Password updated successfully."),e("#editConfigurationForm","#enableNotifications","Notification Configuration updated successfully."),e("#editTabConfigurationForm","#enableTab","Theme Tab Configuration updated successfully."),e("#editEndpointForm","#newEndpoint","Endpoint updated successfully."),e("#editCSSForm","#newCSS","Custom CSS updated successfully."),e("#editJSForm","#newJS","Custom JavaScript updated successfully."),e("#resetModulesForm","#confirmPassword","Modules reset successfully.")});
//# sourceMappingURL=panel-settings.js.map
