scheduled_emails.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {% extends 'auth_layout.html' %}
  2. {% block content %}
  3. {% if context.message %}
  4. <div class="row">
  5. <div class="col text-center text-primary">
  6. <i class="ri-error-warning-fill"></i> {{ context.message }}
  7. </div>
  8. </div>
  9. {% endif %}
  10. <div class="row">
  11. <div class="col">
  12. <a href="{{ url_for('schedule') }}" class="btn btn-dark float-end me-2">Back</a>
  13. <h3><i class="ri-time-line"></i> Scheduled Reminders</h3>
  14. <p class="lead">The following are the scheduled email reminders.</p>
  15. </div>
  16. </div>
  17. <div class="row">
  18. <div class="col">
  19. <table class="table table-flush">
  20. <thead>
  21. <tr>
  22. <th scope="col">Date to Send</th>
  23. <th scope="col">Days before expiration</th>
  24. <th scope="col">Email</th>
  25. <th class="text-end" scope="col">Actions</th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. {% for reminder in context.reminders %}
  30. <tr>
  31. <td>{{ reminder.date }}</td>
  32. <td>{{ reminder.interval }}</td>
  33. <td>{{ reminder.email }}</td>
  34. <td class="text-end">
  35. <a href="#!" data-bs-toggle="modal" data-bs-target="#reminder-{{ loop.index0 }}" class="btn btn-danger">Delete</a>
  36. </td>
  37. </tr>
  38. {% endfor %}
  39. </tbody>
  40. </table>
  41. </div>
  42. </div>
  43. {% for reminder in context.reminders %}
  44. <div class="modal fade" id="reminder-{{ loop.index0 }}" tabindex="-1">
  45. <div class="modal-dialog modal-dialog-centered">
  46. <div class="modal-content">
  47. <div class="modal-header bg-light">
  48. <h1 class="modal-title fs-5">Confirmation </h1>
  49. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  50. </div>
  51. <div class="modal-body">
  52. <p class="lead">Are you sure you want to delete this reminder?</p>
  53. </div>
  54. <div class="modal-footer bg-light">
  55. <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
  56. <a class="btn btn-danger" href="{{ url_for('reminder_remove', id=reminder.id) }}">Yes, remove the reminder</a>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. {% endfor %}
  62. {% endblock %}