tab-config-quarantine.twig 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <div role="tabpanel" class="tab-pane" id="tab-config-quarantine">
  2. <div class="panel panel-default">
  3. <div class="panel-heading">{{ lang.admin.quarantine }}</div>
  4. <div class="panel-body">
  5. {% if not q_data.retention_size or not q_data.max_size %}
  6. <div class="alert alert-info">{{ lang.quarantine.disabled_by_config }}</div>
  7. {% endif %}
  8. <form class="form-horizontal" data-id="quarantine" role="form" method="post">
  9. <div class="form-group">
  10. <label class="col-sm-4 control-label" for="quarantine_retention_size">{{ lang.admin.quarantine_retention_size|raw }}</label>
  11. <div class="col-sm-8">
  12. <input type="number" class="form-control" id="quarantine_retention_size" name="retention_size" value="{{ q_data.retention_size }}" placeholder="0" required>
  13. </div>
  14. </div>
  15. <div class="form-group">
  16. <label class="col-sm-4 control-label" for="quarantine_max_size">{{ lang.admin.quarantine_max_size|raw }}</label>
  17. <div class="col-sm-8">
  18. <input type="number" class="form-control" id="quarantine_max_size" name="max_size" value="{{ q_data.max_size }}" placeholder="0" required>
  19. </div>
  20. </div>
  21. <div class="form-group">
  22. <label class="col-sm-4 control-label" for="quarantine_max_score">{{ lang.admin.quarantine_max_score|raw }}</label>
  23. <div class="col-sm-8">
  24. <input type="number" class="form-control" id="quarantine_max_score" name="max_score" value="{{ q_data.max_score }}" placeholder="9999.0">
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. <label class="col-sm-4 control-label" for="quarantine_max_age">{{ lang.admin.quarantine_max_age|raw }}</label>
  29. <div class="col-sm-8">
  30. <input type="number" class="form-control" id="quarantine_max_age" name="max_age" value="{{ q_data.max_age }}" min="1" required>
  31. </div>
  32. </div>
  33. <hr>
  34. <div class="form-group">
  35. <label class="col-sm-4 control-label" for="quarantine_redirect"><i class="bi bi-box-arrow-right"></i> {{ lang.admin.quarantine_redirect|raw }}</label>
  36. <div class="col-sm-8">
  37. <input type="email" class="form-control" id="quarantine_redirect" name="redirect" value="{{ q_data.redirect }}" placeholder="">
  38. </div>
  39. </div>
  40. <div class="form-group">
  41. <label class="col-sm-4 control-label" for="quarantine_bcc"><i class="bi bi-files"></i> {{ lang.admin.quarantine_bcc|raw }}</label>
  42. <div class="col-sm-8">
  43. <input type="email" class="form-control" id="quarantine_bcc" name="bcc" value="{{ q_data.bcc }}" placeholder="">
  44. </div>
  45. </div>
  46. <hr>
  47. <div class="form-group">
  48. <label class="col-sm-4 control-label" for="quarantine_sender">{{ lang.admin.quarantine_notification_sender }}:</label>
  49. <div class="col-sm-8">
  50. <input type="email" class="form-control" id="quarantine_sender" name="sender" value="{{ q_data.sender }}" placeholder="quarantine@localhost">
  51. </div>
  52. </div>
  53. <div class="form-group">
  54. <label class="col-sm-4 control-label" for="quarantine_subject">{{ lang.admin.quarantine_notification_subject }}:</label>
  55. <div class="col-sm-8">
  56. <input type="text" class="form-control" id="quarantine_subject" name="subject" value="{{ q_data.subject }}" placeholder="Spam Quarantine Notification">
  57. </div>
  58. </div>
  59. <hr>
  60. <div class="form-group">
  61. <label class="col-sm-4 control-label" for="quarantine_release_format">{{ lang.admin.quarantine_release_format }}:</label>
  62. <div class="col-sm-8">
  63. <select data-width="100%" id="quarantine_release_format" name="release_format" class="selectpicker" title="{{ lang.tfa.select }}">
  64. <option {% if q_data.release_format == 'raw' %}selected{% endif %} value="raw">{{ lang.admin.quarantine_release_format_raw }}</option>
  65. <option {% if q_data.release_format == 'attachment' %}selected{% endif %} value="attachment">{{ lang.admin.quarantine_release_format_att }}</option>
  66. </select>
  67. </div>
  68. </div>
  69. <div class="form-group">
  70. <label class="col-sm-4 control-label" for="exclude_domains">{{ lang.admin.quarantine_exclude_domains }}:</label>
  71. <div class="col-sm-8">
  72. <select data-width="100%" name="exclude_domains" class="selectpicker" title="{{ lang.tfa.select }}" multiple>
  73. {% for domain in all_domains %}
  74. <option {% if domain in q_data.exclude_domains|keys %}selected{% endif %}>{{ domain }}</option>
  75. {% endfor %}
  76. </select>
  77. </div>
  78. </div>
  79. <hr>
  80. <legend data-target="#quarantine_template" style="cursor:pointer" unselectable="on" data-toggle="collapse">
  81. <i style="font-size:10pt;" class="bi bi-plus-square"></i> {{ lang.admin.quarantine_notification_html|raw }}
  82. </legend>
  83. <div id="quarantine_template" class="collapse" >
  84. <textarea autocorrect="off" spellcheck="false" autocapitalize="none" class="form-control textarea-code" rows="40" name="html_tmpl">{{ q_data.html_tmpl|raw }}</textarea>
  85. </div>
  86. <button class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="edit_selected" data-item="self" data-id="quarantine" data-api-url='edit/quarantine' data-api-attr='{"action":"settings"}' href="#"><i class="bi bi-check-lg"></i> {{ lang.admin.save }}</button>
  87. </form>
  88. </div>
  89. </div>
  90. </div>