Toast de confirmacion de pregunta creada

This commit is contained in:
2026-09-29 11:24:42 +02:00
parent 42cc1489e9
commit f5a354025e
2 changed files with 22 additions and 3 deletions
+11 -1
View File
@@ -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");
},
});
});
});
function mostrarToast() {
const toastMensaje = document.getElementById("ToastCrearPregunta");
if (toastMensaje) {
const toastBootstrap = bootstrap.Toast.getOrCreateInstance(toastMensaje);
toastBootstrap.show();
}
}