{* Smarty *}

{literal}
<script type="text/javascript">
//<![CDATA[

$(function() {
  AltButtons();
});
  
$(function() {
  $("input[name='dns_servername']").css("width","300px");
  $("input[name='dns_name']").css("width","300px");
});

function showResponseFormDnsAdd(responseText){
  DialogStandartOpen('DnsResultFrm', responseText, 'Результат.');
}

$(function(){
  var options = {
    success: showResponseFormDnsAdd,
    timeout: 36000
  };
  $("#FormDnsAdd").validate({
    submitHandler: function(form) {
      $(form).ajaxSubmit(options);
    },
    rules : {
      "dns_name" : {
        required : true
      }
    },
    errorPlacement: function(error, element) {
      var er = element.attr("name");
      error.appendTo($("label[for='" + er + "']").next() );
    }
  });
});
//]]>
</script>
{/literal}

<form action="{$MS_SP->Sp_PathTop}{$MS_SP->Sp_PathToSite}/AjaxServer/DnsGet.ajax.php" method="post" name="FormDnsAdd" id="FormDnsAdd">
  <table>
    <tr>
      <td><label for="dns_servername">DNS сервер <span class="ui-state-error">* </span>:&nbsp;</label><span></span></td>
      <td><input type="text" id="dns_servername" name="dns_servername" value="{$MS_SP->Sp_Config.DnsServerForUtils}" /></td>
    </tr>
    <tr>
      <td><label for="dns_name">Адрес <span class="ui-state-error">* </span>:&nbsp;</label><span></span></td>
      <td><input type="text" id="dns_name" name="dns_name" value="" /></td>
    </tr>
    <tr>
      <td colspan="2">
        <span class="ui-state-error"> * </span>поля обязательные для заполнения
      </td>
    </tr>
    <tr>
      <td colspan="2" class="MsFormSubmit"><input class="AltButtons" name="FormSubmit" value="Выполнить" type="submit" /></td>
    </tr>
  </table>
</form>