{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}
{% import "macro_functions.phtml" as mf %}
{% block meta_title %}SpamChecker exension settings{% endblock %}
{% set active_menu = 'extensions' %}

{% block content %}

<div class="widget first">
    <div class="head">
        <h5 class="iCog">{% trans 'SpamChecker settings' %}</h5>
    </div>

{% set params = admin.extension_config_get({"ext":"mod_spamchecker"}) %}

<form method="post" action="admin/extension/config_save" class="mainForm api-form" data-api-msg="{% trans 'Configuration updated' %}">
    
    <div class="help">
        <h3>{% trans 'SpamChecker settings' %}</h3>
        <p>{% trans 'Enable captcha for client registration and contact us forms' %}</p>
        <p>{% trans 'Sign up for Recaptcha key for your domain at' %} <a href="http://www.google.com/recaptcha" target="_blank">http://www.google.com/recaptcha</a></p>
    </div>
    <fieldset>
        <div class="rowElem noborder">
            <label>{% trans 'Recaptcha Enabled' %}</label>
            <div class="formRight">
                <input type="radio" name="captcha_enabled" value="1" {% if params.captcha_enabled == "1" %}checked="checked"{% endif %}/><label>{% trans 'Yes' %}</label>
                <input type="radio" name="captcha_enabled" value="0" {% if params.captcha_enabled == "0" %}checked="checked"{% endif %}/><label>{% trans 'No' %}</label>
            </div>
            <div class="fix"></div>
        </div>

        <div class="rowElem">
            <label>{% trans 'ReCaptcha Public key' %}</label>
            <div class="formRight">
                <input type="text" name="captcha_recaptcha_publickey" value="{{params.captcha_recaptcha_publickey}}"/>
            </div>
            <div class="fix"></div>
        </div>

        <div class="rowElem">
            <label>{% trans 'ReCaptcha Private key' %}</label>
            <div class="formRight">
                <input type="text" name="captcha_recaptcha_privatekey" value="{{params.captcha_recaptcha_privatekey}}"/>
            </div>
            <div class="fix"></div>
        </div>
    </fieldset>

    <div class="help">
        <h3>{% trans 'Akismet settings' %}</h3>
        <p>{% trans %} Enable forum messages checking on <a href="http://www.akismet.com/" target="_blank">http://www.akismet.com</a> database{% endtrans %}</p>
    </div>
    <fieldset>
        <div class="rowElem noborder">
            <label>{% trans 'Enable check' %}</label>
            <div class="formRight">
                <input type="radio" name="akismet_enabled" value="1" {% if params.akismet_enabled == "1" %}checked="checked"{% endif %}/><label>{% trans 'Yes' %}</label>
                <input type="radio" name="akismet_enabled" value="0" {% if params.akismet_enabled == "0" %}checked="checked"{% endif %}/><label>{% trans 'No' %}</label>
            </div>
            <div class="fix"></div>
        </div>

        <div class="rowElem">
            <label>{% trans 'Akismet API key' %}</label>
            <div class="formRight">
                <input type="text" name="akismet_api_key" value="{{params.akismet_api_key}}"/>
            </div>
            <div class="fix"></div>
        </div>
        
    </fieldset>
    
    <div class="help">
        <h3>{% trans 'StopForumSpam.com settings' %}</h3>
        <p>{% trans %} If enabled, client ip will be checked on <a href="http://www.stopforumspam.com/" target="_blank">http://www.stopforumspam.com</a> database before registration{% endtrans %}</p>
    </div>
    <fieldset>
        <div class="rowElem noborder">
            <label>{% trans 'Enable check' %}</label>
            <div class="formRight">
                <input type="radio" name="sfs" value="1" {% if params.sfs == "1" %}checked="checked"{% endif %}/><label>{% trans 'Yes' %}</label>
                <input type="radio" name="sfs" value="0" {% if params.sfs == "0" %}checked="checked"{% endif %}/><label>{% trans 'No' %}</label>
            </div>
            <div class="fix"></div>
        </div>

        <input type="submit" value="{% trans 'Update' %}" class="greyishBtn submitForm" />
        <input type="hidden" name="ext" value="mod_spamchecker" />
    </fieldset>
</form>

    <div class="body">
        <a href="{{ 'extension'|alink }}"  title="" class="btnIconLeft mr10"><img src="images/icons/dark/arrowLeft.png" alt="" class="icon"><span>{% trans 'Back to extensions' %}</span></a>
    </div>
</div>

{% endblock %}