<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>

<div class="panel panel_mail_domain">

    <div class="pnl_formsarea">
        <fieldset class="inlineLabels">
            <tmpl_if name="is_admin">
                <div class="ctrlHolder">
                    <tmpl_if name="edit_disabled">
                        <label for="server_id_disabled">{tmpl_var name='server_id_txt'}</label>
                        <select name="server_id_disabled" id="server_id_disabled" class="selectInput" disabled="disabled">
                            {tmpl_var name='server_id'}
                        </select>
                        <input type="hidden" name="server_id" value="{tmpl_var name='server_id_value'}" />
                        <tmpl_else>
                            <label for="server_id">{tmpl_var name='server_id_txt'}</label>
                            <select name="server_id" id="server_id" class="selectInput">
                                {tmpl_var name='server_id'}
                            </select>
                    </tmpl_if>
                </div>
                <tmpl_unless name="domain_option">
                    <div class="ctrlHolder">
                        <label for="client_group_id">{tmpl_var name='client_txt'}</label>
                        <select name="client_group_id" id="client_group_id" class="selectInput">
                            {tmpl_var name='client_group_id'}
                        </select>
                    </div>
                </tmpl_unless>
            <tmpl_else>
                <tmpl_if name="only_one_server">
                    <input type="hidden" id="server_id" name="server_id" value="{tmpl_var name='server_id_value'}" />
                <tmpl_else>
                    <div class="ctrlHolder">
                        <tmpl_if name="edit_disabled">
                            <label for="server_id_disabled">{tmpl_var name='server_id_txt'}</label>
                            <select name="server_id_disabled" id="server_id_disabled" class="selectInput" disabled="disabled">
                                {tmpl_var name='client_server_id'}
                            </select>
                            <input type="hidden" name="server_id" value="{tmpl_var name='server_id_value'}" />
                        <tmpl_else>
                            <label for="server_id">{tmpl_var name='server_id_txt'}</label>
                            <select name="server_id" id="server_id" class="selectInput">
                                {tmpl_var name='client_server_id'}
                            </select>
                        </tmpl_if>
                    </div>
                </tmpl_if>
            </tmpl_if>

            <tmpl_if name="is_reseller">
                <tmpl_unless name="domain_option">
                    <div class="ctrlHolder">
                        <label for="client_group_id">{tmpl_var name='client_txt'}</label>
                        <select name="client_group_id" id="client_group_id" class="selectInput">
                            {tmpl_var name='client_group_id'}
                        </select>
                    </div>
                </tmpl_unless>
            </tmpl_if>

            <div class="ctrlHolder">
                <label for="domain">{tmpl_var name='domain_txt'}</label>
                <tmpl_if name="domain_option">
                    <select name="domain" id="domain" class="selectInput">
                        {tmpl_var name='domain_option'}
                    </select>
                    <tmpl_else>
                        <input name="domain" id="domain" value="{tmpl_var name='domain'}" size="30" maxlength="255" type="text" class="textInput" />
                </tmpl_if>
            </div>
            <div class="ctrlHolder">
                <label for="policy">{tmpl_var name='policy_txt'}</label>
                <select name="policy" id="policy" class="selectInput">
                    {tmpl_var name='policy'}
                </select>
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='active_txt'}</p>
                <div class="multiField">
                    {tmpl_var name='active'}
                </div>
            </div>
			<tmpl_if name="domain_module">
				<input type="hidden" name="domain_module" value="1" id="domain_module" />
			<tmpl_else>
				<input type="hidden" name="domain_module" value="0" id="domain_module" />
			</tmpl_if>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='dkim_settings_txt'}<em></em></div>
            <div style="display:none;">
              <div class="ctrlHolder">
                <p class="label">{tmpl_var name='dkim_txt'}</p>
                <div class="multiField">
                  {tmpl_var name='dkim'}
                </div>
              </div>
              <div class="ctrlHolder">
                <label for="dkim_selector">{tmpl_var name='dkim_selector_txt'}</label>
                <input name="dkim_selector" id="dkim_selector" value="{tmpl_var name='dkim_selector'}" size="20" maxlength="63" type="text" class="textInput" />
              </div>
              <div class="ctrlHolder">
                <label for="dkim_private">{tmpl_var name='dkim_private_txt'}</label>
                <textarea name="dkim_private" id="dkim_private" rows='10' cols='30'>{tmpl_var name='dkim_private'}</textarea>
				<a href="javascript:setRequest()">{tmpl_var name='dkim_generate_txt'}</a>
              </div>
		<div class="ctrlHolder">
                <textarea name="dkim_public" style="display:none;" id="dkim_public" rows='5' cols='30' readonly>{tmpl_var name='dkim_public'}</textarea>
              </div>

              <div class="ctrlHolder">
                <label for="dns_record">{tmpl_var name='dkim_dns_txt'}</label>
                <textarea name="dns_record" id="dns_record" rows='10' cols='30' readonly>{tmpl_var name='dns_record'}</textarea>
              </div>

            </div>

        </fieldset>

        <input type="hidden" name="id" value="{tmpl_var name='id'}">
        <input type="hidden" name="type" value="local">
        <div class="buttonHolder buttons">
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','mail/mail_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('mail/mail_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
        </div>
    </div>
</div>
<script language="JavaScript" type="text/javascript" src="js/mail_domain_dkim.js"></script>
