{* Smarty *}

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

$(function() {
  AltButtons();
});
  
$(function() {
  $("#form_auth_login").css("width","180px");
  $("#form_auth_password").css("width","180px");
});

$(function() {
  $("#form_auth").validate({
    rules : {
      form_auth_login : {required : true, email: true},
      form_auth_password : {
        required : true,
        remote: {
          url: "{/literal}{$MS_SP->Sp_PathTop}{$MS_SP->Sp_PathToSite}/AjaxServer/AuthCheck.ajax.php{literal}",
          type: "post",
          data: {
            form_auth_login: function() {
              return $("#form_auth_login").val();
            }
          }
        }
      }
    },
    errorPlacement: function(error, element) {
      var er = element.attr("name");
      error.appendTo($("label[for='" + er + "']").next() );
    }
  });
});
//]]>
</script>
{/literal}

<form action="{$VarFormAction}" method="post" name="form_auth" id="form_auth">
	<div style="width: 300px;">
<!--    <h3 class="ui-widget-header ui-corner-all">Авторизация:</h3>-->
  <div class="ui-widget-header ui-corner-all ui-state-highlight" style="padding:7px; margin-bottom: 7px;">
    <span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 7px 0;"></span> Необходима ТОЛЬКО для администраторов.
  </div>
  <table>
    <tr>
      <td><label for="form_auth_login">e-mail <span class="ui-state-error">* </span>:&nbsp;</label><span></span></td>
      <td><input id="form_auth_login" name="form_auth_login" type="text" /></td>
    </tr>
    <tr>
      <td><label for="form_auth_password">пароль <span class="ui-state-error">* </span>:&nbsp;</label><span></span></td>
      <td><input id="form_auth_password" name="form_auth_password" type="password" /></td>
    </tr>
    <tr>
      <td colspan="2"><span class="ui-state-error"> * </span>поля обязательные для заполнения</td>
    </tr>
    <tr>
      <td colspan="2" class="MsFormSubmit"><input class="AltButtons" name="form_auth_submit" id="form_auth_submit" value="войти" type="submit" /></td>
    </tr>
  </table>
  </div>
</form>