{* Smarty *}

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

$(function() {
  AltButtons();
});
  
$(function() {
  $("input[name='portscanner_name']").css("width","300px");
  $("input[name='portscanner_b']").css("width","20px");
  $("input[name='portscanner_e']").css("width","20px");
});

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

$(function(){
  var options = {
    success: showResponseFormPortScannerAdd,
    timeout: 360000
  };
  $("#FormPortScannerAdd").validate({
    submitHandler: function(form) {
      $(form).ajaxSubmit(options);
    },
    rules : {
      "portscanner_name" : {
        required : true
      },
      "portscanner_b" : {
        required : true,
        number: true
      },
      "portscanner_e" : {
        number: 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/PortScannerGet.ajax.php" method="post" name="FormPortScannerAdd" id="FormPortScannerAdd">
  <table>
    <tr>
      <td><label for="portscanner_name">Адрес <span class="ui-state-error">* </span>:&nbsp;</label><span></span></td>
      <td><input type="text" id="portscanner_name" name="portscanner_name" value="" /></td>
    </tr>
    <tr>
      <td><label for="portscanner_b">Порт начальное значение <span class="ui-state-error">* </span>:&nbsp;</label><span></span></td>
      <td><input id="portscanner_b" name="portscanner_b" value="" /></td>
    </tr>
    <tr>
      <td><label for="portscanner_e">Порт конечное значение :&nbsp;</label><span></span></td>
      <td><input id="portscanner_e" name="portscanner_e" 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>