{% load i18n %}

{% if type == 'input' %}
<form class="web-setting-form web-input-setting-form">
    <h5 class="web-setting-name">{{ setting_display_name }}</h5>
    <div class="web-setting-input">
        <input class="input" type="text" name="{{ setting_name }}" value="{{ setting_val }}" data-cur="{{ setting_val }}" />
        <p class="error hide"></p>
        <p class="tip">{{ help_tip }}</p>
    </div>
    <div class="web-setting-ops">
        <button type="submit" class="submit sf2-icon-tick tick-green vam hide" title="{% trans "Submit" %}"></button>
        <button type="button" class="cancel sf2-icon-x2 vam hide" title="{% trans "Cancel" %}"></button>
    </div>
</form>
{% endif %}

{% if type == 'checkbox' %}
<form class="web-setting-form web-checkbox-setting-form">{% csrf_token %}
    <h5 class="web-setting-name">{{ setting_display_name }}</h5>
    <div class="web-setting-input">
        <label class="checkbox-label">
            <input class="web-setting-checkbox vam" type="checkbox" name="{{ setting_name }}"{% if setting_val %} checked="checked"{% endif %} />
            <span class="vam">{{ help_tip }}</span>
        </label>
    </div>
</form>
{% endif %}
