Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f5a354025e |
@@ -231,6 +231,8 @@ $("#formCrearPregunta").on("submit", function (e) {
|
|||||||
// Volvemos a activar el botón
|
// Volvemos a activar el botón
|
||||||
boton.prop("disabled", false);
|
boton.prop("disabled", false);
|
||||||
boton.text("Crear pregunta");
|
boton.text("Crear pregunta");
|
||||||
|
// Toast exito
|
||||||
|
mostrarToast()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -244,3 +246,11 @@ $("#formCrearPregunta").on("submit", function (e) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
function mostrarToast() {
|
||||||
|
const toastMensaje = document.getElementById("ToastCrearPregunta");
|
||||||
|
|
||||||
|
if (toastMensaje) {
|
||||||
|
const toastBootstrap = bootstrap.Toast.getOrCreateInstance(toastMensaje);
|
||||||
|
toastBootstrap.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
-2
@@ -174,8 +174,17 @@ $avatarUsuario = htmlspecialchars($_SESSION['avatar'] ?? 'img/avatars/defaultPro
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- TOAST PREGUNTA CREADA -->
|
||||||
|
<div class="toast-container position-fixed bottom-0 end-0 p-3">
|
||||||
|
<div id="ToastCrearPregunta" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
||||||
|
<div class=" toast-header" style="background-color: #46178f;">
|
||||||
|
<h5 class="text-white me-auto bi bi-joystick me-2"> Pregunta Creada</h5>
|
||||||
|
</div>
|
||||||
|
<div class="fs-6 toast-body">
|
||||||
|
La pregunta ha sido creada correctamente
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- MODAL CREAR PREGUNTA -->
|
<!-- MODAL CREAR PREGUNTA -->
|
||||||
<div class="modal fade"
|
<div class="modal fade"
|
||||||
id="modalCrearPregunta"
|
id="modalCrearPregunta"
|
||||||
|
|||||||
Reference in New Issue
Block a user