<div class="panel panel-default" {if $only_contacts}id="domain_block" style="display:none"{/if}>
    <div class="panel-heading">{$lang.lk_domains}</div>
    <div class="panel-body">
        <div class="row">
            <form class="form-inline">
                <div class="col-xs-5 col-sm-6 text-right no-padding">
                    {$lang.lk_system_domain}
                    <span class='help_bt' h_id='lk_system_domain'></span>:
                </div>
                <div class="col-xs-5 text-left" id="lk_client_domain">{$data.login}.{$data.system_domain}</div>
                <div class="col-xs-5 text-left hidden" id="lk_domains_system_domain_s">{$data.system_domain}</div>
            </form>
        </div>
        <div class="row" {if $only_contacts}style="display:none"{/if}>
            <form class="form-inline">
                <div class="col-xs-5 col-sm-6 text-right no-padding">
                    <label for="lk_domains_master_domain_f">{$lang.lk_master_domain}</label>
                    <span class='help_bt' h_id='lk_master_domain'></span>:
                </div>
                <div class="col-xs-5 text-left" id="lk_domains_master_domain_v">
                    <span id="lk_domains_master_domain_s">{$data.master_domain}</span>&nbsp;
                    <a href="#"
                       onclick="lk_change('domains', 'update', 'master_domain'); return false;">{$lang.lk_change}</a>
                </div>
                <div class="col-xs-5 text-left hidden" id="lk_domains_master_domain_e">
                    <div class="form-group">
                        <select class="form-control" id="lk_domains_master_domain_f">
                            {foreach from=$data.master_domain_edit key=key item=val}
                                <option {if $val==$data.master_domain}selected{/if}>{$val}</option>
                            {/foreach}
                        </select>
                        <a href="#"
                           onclick="lk_edit('domains', 'update', 'master_domain'); return false;">{$lang.lk_save}</a>
                        <span id="lk_domains_master_domain_c">&nbsp;</span>
                    </div>
                </div>
            </form>
        </div>
        {if !(strpos($data.plan_text, 'Premium') === false && strpos($data.plan_text, 'Maximum') === false) || isset($all_modules.copyright_off)}
        <div class="row" id="lk_domains_your_domain_block">
            <form class="form-inline">
                <div class="col-xs-5 col-sm-6 text-right no-padding" id="lk_domains_your_domain_k">
                    <label for="lk_domains_your_domain_f">{$lang.lk_your_domain}</label>
                    <span class='help_bt' h_id='lk_client_domain'></span>:
                </div>
                <div class="col-xs-5 text-left" id="lk_domains_your_domain_v">
                    <span id="lk_domains_your_domain_s">{$data.your_domain}</span>&nbsp;
                    <a href="#"
                       onclick="lk_change('domains', 'update', 'your_domain'); return false;">{if $data.your_domain}{$lang.lk_change}{else}{$lang.lk_add}{/if}</a>
                </div>
                <div class="col-xs-5 text-left hidden" id="lk_domains_your_domain_e">
                    <div class="form-group">
                        <input class="form-control" id="lk_domains_your_domain_f" value="{$data.your_domain}">&nbsp;
                        <a href="#"
                           onclick="lk_edit('domains', 'update', 'your_domain'); return false;">{$lang.lk_save}</a>
                        <span id="lk_domains_your_domain_c">&nbsp;</span>
                    </div>
                </div>
            </form>
        </div>
        {/if}
        {if $saas_config.login|substr:0:8 != 'partner-' && !$data.alias_off}
        <div class="row">
            <form class="form-inline">
                <div class="col-xs-5 col-sm-6 text-right no-padding" id="lk_domains_alias_k">
                    <label for="lk_domains_alias_f">{$lang.lk_alias}</label>
                    <span class='help_bt' h_id='lk_alias'></span>:
                </div>
                <div class="col-xs-5 text-left" id="lk_domains_alias_v">
                    <span id="lk_domains_alias_s">{if $data.alias}{$data.alias}.{$data.system_domain}{/if}</span>&nbsp;
                    <a href="#" onclick="lk_change('domains', 'update', 'alias'); return false;">{if $data.alias}{$lang.lk_change}{else}{$lang.lk_add}{/if}</a>
                </div>
                <div class="col-xs-5 text-left hidden" id="lk_domains_alias_e">
                    <div class="form-group">
                        <input class="form-control" id="lk_domains_alias_f" value="{if $data.alias}{$data.alias}{/if}">.{$data.system_domain}&nbsp;
                        <a href="#" onclick="lk_edit('domains', 'update', 'alias'); return false;">{$lang.lk_save}</a>
                        <span id="lk_domains_alias_c">&nbsp;</span>
                    </div>
                </div>
            </form>
        </div>
        {/if}
    </div>
</div>