diff --git a/js/perfil.js b/js/perfil.js index d4c3a02..02859fb 100644 --- a/js/perfil.js +++ b/js/perfil.js @@ -231,6 +231,8 @@ $("#formCrearPregunta").on("submit", function (e) { // Volvemos a activar el botón boton.prop("disabled", false); boton.text("Crear pregunta"); + // Toast exito + mostrarToast() } }, @@ -243,4 +245,12 @@ $("#formCrearPregunta").on("submit", function (e) { boton.text("Crear pregunta"); }, }); -}); \ No newline at end of file +}); +function mostrarToast() { + const toastMensaje = document.getElementById("ToastCrearPregunta"); + + if (toastMensaje) { + const toastBootstrap = bootstrap.Toast.getOrCreateInstance(toastMensaje); + toastBootstrap.show(); + } +} \ No newline at end of file diff --git a/perfil.php b/perfil.php index 4cf3339..0488cfe 100644 --- a/perfil.php +++ b/perfil.php @@ -174,8 +174,17 @@ $avatarUsuario = htmlspecialchars($_SESSION['avatar'] ?? 'img/avatars/defaultPro - - + +