{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}
{% import "macro_functions.phtml" as mf %}
{% block meta_title %}{% trans 'Registrar' %} {{ registrar.title }}{% endblock %}
{% set active_menu = 'system' %}
{% block content %}

<div class="widget first">
    <div class="head">
        <h5>{% trans 'Registrar configuration' %}</h5>
    </div>

    <div class="help">
        <h5>{{ registrar.title }}</h5>
        <p>{{ registrar.label }}</p>
    </div>

    <form method="post" action="admin/servicedomain/registrar_update" class="mainForm save api-form" data-api-msg="Registrar updated">
    <fieldset>
        <div class="rowElem noborder">
            <label>{% trans 'Enable test mode' %}:</label>
            <div class="formRight">
                <input type="radio" name="test_mode" value="1"{% if registrar.test_mode %} checked="checked"{% endif %}/><label>Yes</label>
                <input type="radio" name="test_mode" value="0"{% if not registrar.test_mode %} checked="checked"{% endif %} /><label>No</label>
            </div>
            <div class="fix"></div>
        </div>

        <div class="rowElem">
            <label>{% trans 'Registrar title' %}:</label>
            <div class="formRight">
                <input type="text" name="title" value="{{registrar.title}}" />
            </div>
            <div class="fix"></div>
        </div>

        {# Build form elements from registrar configuration array #}
        {{ mf.build_form(registrar.form, registrar.config) }}

        <input type="submit" value="{% trans 'Update' %}" class="greyishBtn submitForm" />
        <input type="hidden" name="id" value="{{ registrar.id }}" />
    </fieldset>
    </form>
    
    <div class="body">
        <a href="{{ 'servicedomain'|alink }}"  title="" class="btnIconLeft mr10"><img src="images/icons/dark/arrowLeft.png" alt="" class="icon"><span>Go back</span></a>
    </div>
</div>

{% endblock %}