23 lines
678 B
JavaScript
23 lines
678 B
JavaScript
document.getElementById("refund-form").addEventListener("submit", function (event) {
|
|
event.preventDefault();
|
|
|
|
const email = document.getElementById("email").value;
|
|
const reason = document.getElementById("reason").value;
|
|
|
|
const refundCard = document.createElement("div");
|
|
refundCard.classList.add("col");
|
|
|
|
refundCard.innerHTML = `
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Возврат для ${email}</h5>
|
|
<p class="card-text">Причина: ${reason}</p>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
document.getElementById("refund-container").appendChild(refundCard);
|
|
|
|
document.getElementById("refund-form").reset();
|
|
});
|