<div id="add-record-zone-ip">
    {if $custom_ip}
        <div class="form-group"> 
            <label class="control-label col-sm-3">{$MGLANG->T('ip')}</label>
            <div class="col-sm-7">
                <input class="form-control" type="text" name="ip" value="" required pattern="{$patterns.ip}"/>
            </div>
        </div>
    {else}
        <div class="form-group">
            <label class="control-label col-sm-3">{if $any_pool}{$MGLANG->T('ip_or_block')}{else}{$MGLANG->T('ip')}{/if}</label>
            <div class="col-sm-7">
                <select class="select2" name="ip" title="{$MGLANG->absoluteT('addonAA','zones','record_info','name')}" required="">
                    {if $any_pool}
                        {foreach from=$pools item="pool"}
                            <option value="block|{$pool.pool}|{$pool.mask}" data-pool>{$pool.pool}/{$pool.mask}</option>
                        {/foreach}
                    {/if}
                    {foreach from=$ips item="ip"}
                       <option {if $blocked_ips.$ip}disabled{/if} value="{$ip}">{$ip}</option>
                    {foreachelse}
                        {if empty($pools)}
                        <option value="" disabled="">{$MGLANG->T('no_ip_available')}</option>
                        {/if}
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="form-group block-ip" {if count($pools) eq 0}style="display: none"{/if}> 
            <label class="control-label col-sm-3">{$MGLANG->T('ip')}</label>
            <div class="col-sm-7">
                <input class="form-control" type="text" name="ip_from_block" value="" required pattern="{$patterns.ip}"/>
            </div>
        </div>        
    {/if}
</div>

<div class="form-group"> 
    <label class="control-label col-sm-3">{$MGLANG->T('ttl')}</label>
    <div class="col-sm-7">
        <input class="form-control" type="text" name="ttl" value="14400" title="{$MGLANG->absoluteT('addonAA','zones','record_info','ttl')}" placeholder="{$MGLANG->T('ttl')}" required="" min="1"/>
    </div>
</div>
<div class="form-group record-rdata"> 
    <label class="control-label col-sm-3">{$MGLANG->T('rdata')}</label>
    <div class="col-sm-7">
        <input class="form-control" type="text" name="field[ptrdname]" title="{$MGLANG->absoluteT('addonAA','zones','record_field_info','PTR', 'ptrdname')}" placeholder="{$MGLANG->absoluteT('addonCA','zones','record_field_placeholder','PTR', 'ptrdname')}" />    
    </div>
</div>