edit_mail.html 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <!-- Begin toolbar -->
  2. <div class="l-sort">
  3. <div class="l-sort__inner">
  4. <div class="l-unit-toolbar__buttonstrip">
  5. <a class="button button-secondary" id="btn-back" href="/list/mail/"><i class="fas fa-arrow-left status-icon blue"></i><?=_('Back');?></a>
  6. </div>
  7. <div class="l-unit-toolbar__buttonstrip">
  8. <a href="#" class="button" data-action="submit" data-id="vstobjects"><i class="fas fa-floppy-disk status-icon purple"></i><?=_('Save');?></a>
  9. </div>
  10. </div>
  11. </div>
  12. <!-- End toolbar -->
  13. <div class="l-center animate__animated animate__fadeIn">
  14. <form id="vstobjects" name="v_edit_mail" method="post" class="<?=$v_status?>">
  15. <input type="hidden" name="token" value="<?=$_SESSION['token']?>">
  16. <input type="hidden" name="save" value="save">
  17. <div class="form-container">
  18. <h1 class="form-title"><?=_('Editing Mail Domain');?></h1>
  19. <?php show_alert_message($_SESSION);?>
  20. <div class="u-mb20">
  21. <label for="v_domain" class="form-label"><?=_('Domain');?></label>
  22. <input type="text" class="form-control" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>" disabled>
  23. <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
  24. </div>
  25. <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
  26. <div class="u-mb10">
  27. <label for="v_webmail" class="form-label"><?=_('Webmail Client');?></label>
  28. <select class="form-select" name="v_webmail" id="v_webmail" tabindex="6">
  29. <?php foreach ($webmail_clients as $client){
  30. echo "\t\t\t\t<option value=\"".htmlentities($client)."\"";
  31. if (( htmlentities(trim($v_webmail,"'")) == $client )) {
  32. echo ' selected' ;
  33. }
  34. echo ">".htmlentities(ucfirst($client))."</option>\n";
  35. }
  36. ?>
  37. <option value="disabled" <?php if (htmlentities(trim($v_webmail,"'")) == 'disabled') { echo "selected";}?>><?=_('Disabled');?></option>
  38. </select>
  39. </div>
  40. <?php } ?>
  41. <div class="u-mb10">
  42. <label for="v_catchall" class="form-label"><?=_('Catchall email');?></label>
  43. <input type="email" class="form-control" name="v_catchall" id="v_catchall" value="<?=htmlentities(trim($v_catchall, "'"))?>">
  44. </div>
  45. <div class="u-mb20">
  46. <label for="v_rate" class="form-label">
  47. <?=_('Rate limit');?> <span class="optional">(<?=_('Email / hour / account');?>)</span>
  48. </label>
  49. <input type="text" class="form-control" name="v_rate" id="v_rate" value="<?=htmlentities(trim($v_rate, "'"))?>" <?php if($_SESSION['userContext'] != "admin"){ echo "disabled";}?>>
  50. </div>
  51. <?php if (!empty($_SESSION['ANTISPAM_SYSTEM'])) {?>
  52. <div class="form-check u-mb10">
  53. <input class="form-check-input" type="checkbox" name="v_antispam" id="v_antispam" <?php if ($v_antispam == 'yes') echo 'checked'; ?>>
  54. <label for="v_antispam">
  55. <?=_('AntiSpam Support');?>
  56. </label>
  57. </div>
  58. <div class="form-check u-mb10">
  59. <input class="form-check-input" type="checkbox" name="v_reject" id="v_reject" <?php if ($v_reject == 'yes') echo 'checked'; ?>>
  60. <label for="v_reject">
  61. <?=_('Reject spam');?>
  62. </label>
  63. </div>
  64. <?php } ?>
  65. <?php if (!empty($_SESSION['ANTIVIRUS_SYSTEM'])) {?>
  66. <div class="form-check u-mb10">
  67. <input class="form-check-input" type="checkbox" name="v_antivirus" id="v_antivirus" <?php if ($v_antivirus == 'yes') echo 'checked'; ?>>
  68. <label for="v_antivirus">
  69. <?=_('AntiVirus Support');?>
  70. </label>
  71. </div>
  72. <?php } ?>
  73. <div class="form-check u-mb10">
  74. <input class="form-check-input" type="checkbox" name="v_dkim" id="v_dkim" <?php if ($v_dkim == 'yes') echo 'checked'; ?>>
  75. <label for="v_dkim">
  76. <?=_('DKIM Support');?>
  77. </label>
  78. </div>
  79. <div class="form-check u-mb10">
  80. <input class="form-check-input" type="checkbox" name="v_ssl" id="v_ssl" <?php if ($v_ssl == 'yes') echo 'checked' ?> onclick="javascript:elementHideShow('ssltable');">
  81. <label for="v_ssl">
  82. <?=_('SSL Support');?>
  83. </label>
  84. </div>
  85. <div id="ssltable" class="u-pl30" style="display:<?php if ($v_ssl == 'no' ) { echo 'none';} else {echo 'block';}?> ;">
  86. <div class="form-check u-mb10">
  87. <input class="form-check-input" type="checkbox" name="v_letsencrypt" id="v_letsencrypt" onclick="javascript:elementHideShow('ssl-details');App.Actions.MAIL.toggle_letsencrypt(this);" <?php if($v_letsencrypt == 'yes' || $v_letsencrypt == 'on') echo 'checked' ?>">
  88. <label for="v_letsencrypt">
  89. <?=_('Lets Encrypt Support');?>
  90. </label>
  91. </div>
  92. <div id="le-warning" class="u-mb20">
  93. <div class="alert alert-info alert-with-icon" role="alert">
  94. <i class="fas fa-exclamation"></i>
  95. <p><?php echo $v_webmail_alias;?></p>
  96. <p><?=sprintf(_("To enable Let's Encrypt SSL, ensure that DNS records exist for mail.%s and %s!"), $v_domain, $v_webmail_alias); ?></p>
  97. </div>
  98. </div>
  99. <div id="ssl-details" style="<?php if ($v_letsencrypt == 'yes' || $v_letsencrypt == 'on') { echo 'display: none;'; } ?>">
  100. <div class="u-mb10">
  101. <label for="v_ssl_crt" class="form-label">
  102. <?=_('SSL Certificate');?>
  103. <span id="generate-csr"> / <a class="generate" target="_blank" href="/generate/ssl/?domain=<?=htmlentities($v_domain)?>"><?=_('Generate CSR');?></a></span>
  104. </label>
  105. <textarea class="form-control u-min-height100 u-console" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_crt" id="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
  106. </div>
  107. <div class="u-mb10">
  108. <label for="v_ssl_key" class="form-label"><?=_('SSL Key');?></label>
  109. <textarea class="form-control u-min-height100 u-console" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_key" id="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
  110. </div>
  111. <div class="u-mb20">
  112. <label for="v_ssl_ca" class="form-label">
  113. <?=_('SSL Certificate Authority / Intermediate');?> <span class="optional">(<?=_('optional');?>)</span>
  114. </label>
  115. <textarea class="form-control u-min-height100 u-console" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_ca" id="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
  116. </div>
  117. </div>
  118. <?php if ($v_ssl != 'no' ) { ?>
  119. <table class="additional-info">
  120. <tr>
  121. <td>
  122. <b><?=_('SUBJECT');?>:</b>
  123. </td>
  124. <td class="details">
  125. <?=htmlentities($v_ssl_subject);?>
  126. </td>
  127. </tr>
  128. <?php if ($v_ssl_aliases){?>
  129. <tr>
  130. <td>
  131. <b><?=_('Aliases');?>:</b>
  132. </td>
  133. <td class="details">
  134. <?=htmlentities($v_ssl_aliases)?>
  135. </td>
  136. </tr>
  137. <?php } ?>
  138. <tr>
  139. <td>
  140. <b><?=_('NOT_BEFORE');?>:</b>
  141. </td>
  142. <td class="details">
  143. <?=htmlentities($v_ssl_not_before)?>
  144. </td>
  145. </tr>
  146. <tr>
  147. <td>
  148. <b><?=_('NOT_AFTER');?>:</b>
  149. </td>
  150. <td class="details">
  151. <?=htmlentities($v_ssl_not_after)?>
  152. </td>
  153. </tr>
  154. <tr>
  155. <td>
  156. <b><?=_('SIGNATURE');?>:</b>
  157. </td>
  158. <td class="details">
  159. <?=htmlentities($v_ssl_signature)?>
  160. </td>
  161. </tr>
  162. <tr>
  163. <td>
  164. <b><?=_('PUB_KEY');?>:</b>
  165. </td>
  166. <td class="details">
  167. <?=htmlentities($v_ssl_pub_key)?>
  168. </td>
  169. </tr>
  170. <tr>
  171. <td>
  172. <b><?=_('ISSUER');?>:</b>
  173. </td>
  174. <td class="details">
  175. <?=htmlentities($v_ssl_issuer)?>
  176. </td>
  177. </tr>
  178. </table>
  179. <? } // if ssl is enabled ?>
  180. </div>
  181. <div class="form-check u-mb10">
  182. <input class="form-check-input" type="checkbox" name="v_smtp_relay" id="v_smtp_relay" <?php if ($v_smtp_relay == 'true') echo 'checked'; ?> onclick="javascript:elementHideShow('smtp_relay_table');">
  183. <label for="v_smtp_relay">
  184. <?=_('SMTP Relay');?>
  185. </label>
  186. </div>
  187. <div id="smtp_relay_table" class="u-pl30" style="display:<?php if ($v_smtp_relay == 'true') {echo 'block';} else {echo 'none';}?> ;">
  188. <div class="u-mb10">
  189. <label for="v_smtp_relay_host" class="form-label"><?=_('Host');?></label>
  190. <input type="text" class="form-control" name="v_smtp_relay_host" id="v_smtp_relay_host" value="<?=htmlentities(trim($v_smtp_relay_host, "'"))?>">
  191. </div>
  192. <div class="u-mb10">
  193. <label for="v_smtp_relay_port" class="form-label"><?=_('Port');?></label>
  194. <input type="text" class="form-control" name="v_smtp_relay_port" id="v_smtp_relay_port" value="<?=htmlentities(trim($v_smtp_relay_port, "'"))?>">
  195. </div>
  196. <div class="u-mb10">
  197. <label for="v_smtp_relay_user" class="form-label"><?=_('Username');?></label>
  198. <input type="text" class="form-control" name="v_smtp_relay_user" id="v_smtp_relay_user" value="<?=htmlentities(trim($v_smtp_relay_user, "'"))?>">
  199. </div>
  200. <div class="u-mb10">
  201. <label for="v_smtp_relay_pass" class="form-label"><?=_('Password');?></label>
  202. <input type="text" class="form-control" name="v_smtp_relay_pass" id="v_smtp_relay_pass">
  203. </div>
  204. </div>
  205. </div>
  206. </form>
  207. </div>