feat(share pop-up): Post-Request-Prozess hinzugefügt.

This commit is contained in:
Developer 02
2024-10-09 15:03:54 +02:00
parent 25cd1601a6
commit 0eb5897185
3 changed files with 17 additions and 12 deletions

View File

@@ -114,15 +114,15 @@
<div class="modal-body">
<div class="input-group mb-3">
<span class="input-group-text">E-Mail</span>
<input type="text" class="form-control" placeholder="user@samplemail.com" aria-label="">
<input type="text" class="form-control" placeholder="user@samplemail.com" id="readonly-receiver-mail" aria-label="">
</div>
<div class="input-group">
<span class="input-group-text">Gültig bis</span>
<input type="date" name="expiration" class="form-control">
<input type="date" name="expiration" class="form-control" id="readonly-date-valid">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">
<button type="button" class="btn btn-primary" id="readonly-send">
<span class="material-symbols-outlined">
send
</span>
@@ -135,12 +135,17 @@
<div id='app'></div>
</div>
<script nonce="@nonce">
document.addEventListener("DOMContentLoaded", function () {
const shareButton = document.querySelector('.dd-card-preview button');
document.getElementById('readonly-send').addEventListener('click', async () => {
const receiverMail = document.getElementById('readonly-receiver-mail').value;
const dateValid = document.getElementById('readonly-date-valid').value;
shareButton.addEventListener('click', function () {
// click action logic
});
await shareEnvelope(receiverMail, dateValid)
.then(res => {
console.log(res)
})
.catch(err => {
console.log(err)
})
});
const collapseNav = () => {