Toast de confirmacion de pregunta creada
This commit is contained in:
+11
-1
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user