Fix #2252 add option to whitelist an IP/range in spamfilter module

This commit is contained in:
Kijin Sung 2024-01-02 23:20:33 +09:00
parent ca4e2d60e3
commit e0cdd463f4
5 changed files with 24 additions and 4 deletions

View file

@ -1,6 +1,6 @@
<include target="./header.html" />
<section class="section">
<form action="./" method="post" id="spamfilterConfig" class="x_form-horizontal">
<form action="./" method="post" id="spamfilterConfig" class="x_form-horizontal">
<input type="hidden" name="act" value="procSpamfilterAdminInsertConfig" />
<input type="hidden" name="module" value="spamfilter" />
<input type="hidden" name="xe_validator_id" value="modules/spamfilter/tpl/1" />
@ -16,7 +16,7 @@
{$lang->cmd_yes}
</label>
<label for="spamCond1_no" class="x_inline">
<input type="radio" name="limits" id="spamCond1_no" value="N" checked="checked"|cond="$config->limits!='Y' && $config->limits !=''" />
<input type="radio" name="limits" id="spamCond1_no" value="N" checked="checked"|cond="$config->limits!='Y' && $config->limits !=''" />
{$lang->cmd_no}
</label>
</p>
@ -60,6 +60,13 @@
<p class="x_help-block">{$lang->cmd_block_range_help}</p>
</div>
</div>
<div class="x_control-group">
<label for="except_ip" class="x_control-label">{$lang->cmd_spamfilter_except_ip}</label>
<div class="x_controls">
<textarea name="except_ip" id="except_ip">{implode("\n", $config->except_ip ?? [])}</textarea>
<p class="x_help-block">{$lang->cmd_spamfilter_except_ip_help}</p>
</div>
</div>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>