Form analysis
1 forms found in the DOM
POST
<form action="" method="post" class="samoware-login__form" autocomplete="off" id="mainFrom">
<script type="text/javascript">
var basePathRef = "/SkinFiles/cgp05.cloud.mts.ru/Samoware/";
skin = "samoware";
(function() {
"use strict";
var logoImage = basePathRef + "logo-big.svg";
if (skin) {
logoImage = basePathRef + "logo-big-" + skin + ".svg";
}
function checkLoaded() {
if (!document.getElementById("samoware-login__logo-img-id")) {
setTimeout(function() {
checkLoaded();
}, 100);
} else {
document.getElementById("samoware-login__logo-img-id").setAttribute("src", logoImage);
}
}
checkLoaded();
}());
</script>
<div class="samoware-login__logo">
<img alt=" Logo" id="samoware-login__logo-img-id" class="samoware-login__logo-img" src="/SkinFiles/cgp05.cloud.mts.ru/Samoware/logo-big-samoware.svg">
</div>
<div class="samoware-login__start samoware-login-auth__start" id="samoware-login__start">
<div class="samoware-login-auth__start-element samoware-login__list">
<ul class="samoware-login__list-content">
<li class="samoware-login__item">
<label class="samoware-login__type">Имя Пользователя</label>
<span class="samoware-login__field-wrapper">
<input name="username" type="text" class="samoware-login__field samoware-login__login" autocomplete="on" tabindex="1">
</span>
</li>
<li class="samoware-login__item" id="samoware-login__domain-select-line" style="display: none;">
<label class="samoware-login__type">Имя домена</label>
<span class="samoware-login__field-wrapper">
<select id="samoware-login__domain-selector" class="samoware-login__field samoware-login__selector"></select>
</span>
</li>
<li id="samoware-login__password-line" class="samoware-login__item">
<label class="samoware-login__type">Пароль</label>
<span class="samoware-login__field-wrapper">
<input name="Password" type="password" class="samoware-login__field samoware-login__password" tabindex="2">
</span>
</li>
</ul>
</div>
<div class="samoware-login-auth__start-element samoware-login__error samoware-login__error-common"></div>
<fieldset class="samoware-login-auth__start-element samoware-login__remember">
<input name="rememberMe" type="checkbox" id="samoware-login__remember" class="samoware-login__remember-field" tabindex="3">
<span class="samoware-login__remember-field-icon"></span>
<label for="samoware-login__remember" class="samoware-login__remember-label">Запомнить вход</label>
</fieldset>
<div class="samoware-login-auth__start-element samoware-login__links-box samoware-login__links-box_auto-login">
<img src="/SkinFiles/cgp05.cloud.mts.ru/Samoware/loginArrowRight.svg" class="samoware-login__auto-login-icon">
<a class="samoware-login__link-button samoware-login__auto-login">Автоматический Вход</a>
</div>
<div class="samoware-login-auth__start-element samoware-login__links-box samoware-login__links-box_qr-code-login">
<img src="/SkinFiles/cgp05.cloud.mts.ru/Samoware/loginArrowRight.svg" class="samoware-login__auto-login-icon">
<a class="samoware-login__link-button samoware-login__qr-code-login">Вход с помощью QR кода</a>
</div>
<input type="submit" name="login" class="samoware-login-auth__start-element samoware-button samoware-login__button samoware-login__submit" tabindex="5" value="Войти">
<div class="samoware-login-auth__start-element samoware-login__links-box samoware-login__links-box_recover-invite">
<img src="/SkinFiles/cgp05.cloud.mts.ru/Samoware/login-form-recovery-key.svg" class="samoware-login__recover-password-key">
<a class="samoware-login__link-button samoware-login__recover-password-invite">Восстановление Забытого Пароля</a>
</div>
</div>
<div class="samoware-login__start samoware-login-sms__start" style="display: none;">
<div class="samoware-login__list">
<ul class="samoware-login__list-content">
<li class="samoware-login__item"><label class="samoware-login__type">SMS-пароль</label>
<span class="samoware-login__field-wrapper"><input id="smsPassword" name="smsPassword" type="text" class="samoware-login__field samoware-login__sms" tabindex="1"></span>
</li>
</ul>
</div>
<div class="samoware-login__error samoware-login__error-common"></div>
<input type="submit" name="smsLogin" class="samoware-button samoware-login__submit" tabindex="4" value="Войти">
</div>
<div class="samoware-login__start samoware-login__multi-factor-authentication__form" style="display: none;">
<div class="samoware-login__list samoware-login__multi-factor-authentication__methods-selector-form">
<ul class="samoware-login__list-content samoware-login__margin-bottom">
<li class="samoware-login__item">
<label class="samoware-login__type samoware-login__type-center">Выберите метод дополнительной аутентификации</label>
</li>
</ul>
<div class="samoware-login__multi-factor-authentication__methods-wrapper samoware-login__margin-bottom">
<ul class="samoware-login__list-content samoware-login__list-content_full-width" id="multiFactorMethods">
</ul>
</div>
</div>
<div class="samoware-login__list samoware-login__multi-factor-authentication__confirmation-form" style="display: none;">
<ul class="samoware-login__list-content samoware-login__list-content_full-width samoware-login__margin-bottom">
<li class="samoware-login__item">
<label class="samoware-login__type samoware-login__type-center">Двухфакторная аутентификация</label>
</li>
</ul>
<ul class="samoware-login__list-content">
<li class="samoware-login__item">
<span class="samoware-login__field-wrapper">
<input id="twoFactorAuthenticationCode" type="text" placeholder="Введите код подтверждения" class="samoware-login__field" tabindex="1">
</span>
</li>
</ul>
</div>
<div class="samoware-login__list samoware-login__multi-factor-authentication__wait-form" style="display: none;">
<ul class="samoware-login__list-content">
<li class="samoware-login__item">
<label class="samoware-login__type samoware-login__type-center">Ожидается завершение второго этапа аутентификации</label>
</li>
</ul>
</div>
<div class="samoware-login__error samoware-login__error-common samoware-login__multi-factor-authentication__error" id="x2authError"></div>
<input type="button" class="samoware-button samoware-login__button samoware-login__multi-factor-authentication__start-button" tabindex="4" id="x2authStartButton" value="Начать">
<input type="button" class="samoware-button samoware-login__button samoware-login__multi-factor-authentication__start-button" tabindex="4" id="x2authVerifyButton" value="Войти" style="display: none;">
<a class="samoware-login__link-button" id="x2authExitButton">Выход</a>
<script type="text/javascript">
var selectedMethod, selectedType, x2authCallback, backgroundCheckInterval;
startMultifactorAuthentication = function(x2authNode, callback) {
x2authCallback = callback;
var methodsList = x2authNode.children();
if (methodsList.length < 1) {
handleMultiFactorAuthenticationError("No x2auth methods, while expected");
} else {
showForm("select", true);
showForm("confirm", false);
showForm("wait", false);
$("#x2authError").hide();
var methodsWrapper = $("#multiFactorMethods");
methodsWrapper.empty();
methodsList.each(function(index, item) {
var item = $(formMethodLi(item));
item.click(selectMethodByLiClick);
methodsWrapper.append(item);
});
selectMethodByLi(methodsWrapper.children()[0]);
}
},
showForm = function(form, visible) {
if (form == "select") {
if (visible) {
$(".samoware-login__multi-factor-authentication__methods-selector-form").show();
$("#x2authStartButton").show();
} else {
$(".samoware-login__multi-factor-authentication__methods-selector-form").hide();
$("#x2authStartButton").hide();
}
} else if (form == "confirm") {
if (visible) {
$(".samoware-login__multi-factor-authentication__confirmation-form").show();
$("#x2authVerifyButton").show();
$("#twoFactorAuthenticationCode").focus();
} else {
$(".samoware-login__multi-factor-authentication__confirmation-form").hide();
$("#x2authVerifyButton").hide();
}
} else if (form == "wait") {
if (visible) {
$(".samoware-login__multi-factor-authentication__wait-form").show();
} else {
$(".samoware-login__multi-factor-authentication__wait-form").hide();
}
}
},
handleMultiFactorAuthenticationError = function(error) {
$("#x2authError").show().text(getErrorString(error));
},
formMethodLi = function(itemNode) {
var labelTag = $(itemNode).find('subKey[key="humanTag"]'),
isSelector = $(itemNode).find('subValue').length > 0;
if (!labelTag || labelTag.length < 1) {
labelTag = $(itemNode).find('subKey[key="humanName"]');
}
if (!labelTag || labelTag.length < 1) {
labelTag = null;
}
var labelText = labelTag ? getString(labelTag.text()) : $(itemNode).attr('key'),
icon = $(itemNode).find('subKey[key="icon"]').length > 0 ? $(itemNode).find('subKey[key="icon"]').text() : null,
addressTag = $(itemNode).find('subKey[key="address"]'),
addressText = addressTag.text() ? getString(addressTag.text()) : '',
liItemStr = '<li class="samoware-login__item samoware-login__multi-factor-authentication__method-item" method="' + $(itemNode).attr("key") + '" type="' + (isSelector ? 'select' : 'text') + '"">';
liItemStr += '<span class="samoware-login__field-wrapper samoware-login__multi-factor-authentication__method-item-radio"><input type="radio" name="methodsGroup" value="' + $(itemNode).attr("key") + '"/></span>';
if (icon) {
liItemStr += '<span class="samoware-login__field-wrapper samoware-login__multi-factor-authentication__method-item-icon"><img src="/SkinFiles/cgp05.cloud.mts.ru/Samoware/' + icon + '"></span>';
}
liItemStr += '<span class="samoware-login__field-wrapper samoware-login__multi-factor-authentication__method-item-label">' + labelText + '</span>';
liItemStr += '<span class="samoware-login__field-wrapper samoware-login__multi-factor-authentication__method-item-value">';
if (isSelector) {
liItemStr += '<select class="samoware-login__multi-factor-authentication__custom-selector">';
addressTag.children().each(function(index, customAddressItem) {
liItemStr += '<option index="' + index + '">' + $(customAddressItem).text() + '</option>';
});
liItemStr += '</select>';
} else {
liItemStr += addressText;
}
liItemStr += '</span></li>';
return liItemStr;
},
selectMethodByLi = function(li) {
$(li).find("input").prop('checked', true);
selectedMethod = $(li).attr("method");
selectedType = $(li).attr("type");
},
selectMethodByLiClick = function(event) {
selectMethodByLi(event.currentTarget);
},
x2auth_exit = function() {
if (backgroundCheckInterval) {
clearInterval(backgroundCheckInterval);
}
if (x2authCallback) {
x2authCallback("Exit");
x2authCallback = null;
}
},
x2auth_start = function() {
if (!sessionInstance) {
return;
}
sessionInstance.setAsyncProcessor(this, function(sessionXML) {
if (backgroundCheckInterval) {
clearInterval(backgroundCheckInterval);
}
if (x2authCallback) {
x2authCallback();
x2authCallback = null;
}
}, "x2authCompleted");
showForm("select", false);
var x2AuthStartNode = sessionInstance.createXMLNode("x2AuthStart");
if (selectedType == "select") {
var selector = $(".samoware-login__multi-factor-authentication__custom-selector"),
customIndex = 0;
var option = selector[0].selectedOptions[0];
if (option) {
customIndex = $(option).attr("index");
}
x2AuthStartNode.setAttribute("index", customIndex);
}
x2AuthStartNode.appendChild(sessionInstance.createTextNode(selectedMethod));
sessionInstance.sendRequest(x2AuthStartNode, null, function(responseXML, requestXML) {
if ($(responseXML).attr("background") == "1") {
showForm("wait", true);
x2auth_background();
} else if ($(responseXML).attr("user") == "1") {
showForm("confirm", true);
$("#twoFactorAuthenticationCode").val("");
} else {
handleMultiFactorAuthenticationError("Wrong answer");
}
}, function(error, requestXML) {}, true);
},
x2auth_verify = function() {
var code = $("#twoFactorAuthenticationCode").val();
$("#x2authError").hide();
x2auth_complete(code, function(error) {
if (error) {
handleMultiFactorAuthenticationError(error);
} else {
if (x2authCallback) {
x2authCallback();
x2authCallback = null;
}
}
});
},
x2auth_background = function() {
backgroundCheckInterval = setInterval(function() {
x2auth_complete(null, function(error) {
if (error) {} else {
clearInterval(backgroundCheckInterval);
if (x2authCallback) {
x2authCallback();
x2authCallback = null;
}
}
});
}, 2000);
},
x2auth_complete = function(data, callback) {
var x2AuthCompleteNode = sessionInstance.createXMLNode("x2AuthComplete");
if (data) {
x2AuthCompleteNode.appendChild(sessionInstance.createTextNode(data));
}
sessionInstance.sendRequest(x2AuthCompleteNode, null, null, function(error, requestXML) {
if (callback) {
callback(error);
}
}, true);
},
getString = function(str) {
var string = "Test";
if (typeof __stringsXml === "undefined") {
return str;
}
try {
var query = str.split(".").map(function(part) {
return '[name="' + part + '"]';
}).join(" ");
string = __stringsXml.querySelector(query);
if (!string) {
return str;
}
if (string.nodeName === "string") {
return string.textContent;
}
} catch (e) {
string = str;
}
return string;
},
getErrorString = function(str) {
var string = "Error";
if (typeof __stringsXml === "undefined") {
return str;
}
try {
var labelId = "ErrorCodes." + str,
query = labelId.split(".").map(function(part) {
return '[name="' + part + '"]';
}).join(" ");
string = __stringsXml.querySelector(query);
if (!string) {
return str;
}
if (string.nodeName === "string") {
return string.textContent;
}
} catch (e) {
string = str;
}
return string;
},
initMultifactor = function() {
$('#twoFactorAuthenticationCode').keydown(function(event) {
if (event.keyCode == 13) {
x2auth_verify();
}
});
$('#x2authStartButton').click(x2auth_start);
$('#x2authVerifyButton').click(x2auth_verify);
$('#x2authExitButton').click(x2auth_exit);
};
</script>
</div>
<div class="samoware-login__start samoware-login__change-password__form" style="display: none;">
<div class="samoware-login__list">
<ul class="samoware-login__list-content samoware-login__list-content_full-width">
<li class="samoware-login__item">
<label class="samoware-login__type samoware-login__type-center">Изменение Пароля</label>
</li>
</ul>
<ul class="samoware-login__list-content">
<li class="samoware-login__item">
<label class="samoware-login__type">Текущий Пароль</label>
<span class="samoware-login__field-wrapper"><input id="passwordModification_oldPassword" type="password" class="samoware-login__field" tabindex="1"></span>
</li>
<li class="samoware-login__item">
<label class="samoware-login__type">Новый Пароль</label>
<span class="samoware-login__field-wrapper"><input id="passwordModification_newPassword" type="password" class="samoware-login__field" tabindex="2"></span>
</li>
<li class="samoware-login__item">
<label class="samoware-login__type">Повтор Нового Пароля</label>
<span class="samoware-login__field-wrapper"><input id="passwordModification_verifyPassword" type="password" class="samoware-login__field" tabindex="3"></span>
</li>
</ul>
</div>
<div class="samoware-login__error samoware-login__error-common samoware-login__multi-factor-authentication__error" id="passwordModificationError"></div>
<input type="button" id="passwordModification_startModify" class="samoware-button samoware-login__change-password__start-button" tabindex="4" value="Изменить">
<div class="samoware-login__links-box">
<a class="samoware-login__link-button" id="passwordModification_cancelModify">Выход</a>
</div>
<script type="text/javascript">
var passwordModifyCallback,
doNotMatchMessage = "Пароли не совпадают",
startPasswordModification = function(callback) {
passwordModifyCallback = callback;
$("#passwordModificationError").hide();
},
handlePasswordModificationError = function(error) {
$("#passwordModificationError").show().text(getErrorString(error));
},
passwordModify_exit = function() {
if (passwordModifyCallback) {
passwordModifyCallback("Exit");
passwordModifyCallback = null;
}
},
passwordModify_start = function() {
var oldPassword = $("#passwordModification_oldPassword").val(),
newPassword = $("#passwordModification_newPassword").val(),
reenterPassword = $("#passwordModification_verifyPassword").val();
$("#passwordModificationError").hide();
if (!oldPassword) {
handlePasswordModificationError("No old password");
return;
}
if (!newPassword || newPassword != reenterPassword) {
handlePasswordModificationError(doNotMatchMessage);
return;
}
if (!sessionInstance) {
return;
}
$(".samoware-login__change-password__form").hide();
$(".samoware-login__siginingin").show();
var passwordModifyNode = sessionInstance.createXMLNode("passwordModify");
passwordModifyNode.setAttribute("oldPassword", oldPassword);
passwordModifyNode.setAttribute("newPassword", newPassword);
sessionInstance.sendRequest(passwordModifyNode, null, null, function(error, requestXML) {
$(".samoware-login__siginingin").hide();
$(".samoware-login__change-password__form").show();
if (error) {
handlePasswordModificationError(error);
} else {
storedPassword = newPassword;
if (passwordModifyCallback) {
passwordModifyCallback();
passwordModifyCallback = null;
}
}
}, true);
},
getErrorString = function(str) {
var string = "Error";
if (typeof __stringsXml === "undefined") {
return str;
}
try {
var labelId = "ErrorCodes." + str,
query = labelId.split(".").map(function(part) {
return '[name="' + part + '"]';
}).join(" ");
string = __stringsXml.querySelector(query);
if (!string) {
return str;
}
if (string.nodeName === "string") {
return string.textContent;
}
} catch (e) {
string = str;
}
return string;
},
initPasswordModification = function() {
$('#passwordModification_startModify').click(passwordModify_start);
$('#passwordModification_cancelModify').click(passwordModify_exit);
};
</script>
</div>
<div class="samoware-login__start samoware-login-password-recovery__start" style="display: none;">
<div class="samoware-login-auth__start-element samoware-login__list">
<ul class="samoware-login__list-content">
<li class="samoware-login__item"><label class="samoware-login__type">Имя Пользователя</label>
<span class="samoware-login__field-wrapper"><input id="username" name="Username" type="text" class="samoware-login__field samoware-login__recover-account-password" tabindex="1"></span>
</li>
</ul>
</div>
<input type="button" name="passwordRecovery" class="samoware-login-auth__start-element samoware-button samoware-login__button samoware-login__recover-password" tabindex="3" value="Отправить мне мой Пароль">
<div class="samoware-login-auth__start-element samoware-login__error samoware-login__error-password-recovery"></div>
<div class="samoware-login-auth__start-element samoware-login__success samoware-login__success-password-recovery">Пароль отправлен на адрес восстановления</div>
<div class="samoware-login-auth__start-element samoware-login__links-box">
<img src="/SkinFiles/cgp05.cloud.mts.ru/Samoware/login-form-login-icon.svg" class="samoware-login__recover-password-back">
<a class="samoware-login__link-button samoware-login__cancel-recover-password">Войти</a>
</div>
</div>
<div class="samoware-login__siginingin">
<div class="samoware-login__spinner">
<div class="samoware-login__spinner__bar1"></div>
<div class="samoware-login__spinner__bar2"></div>
<div class="samoware-login__spinner__bar3"></div>
<div class="samoware-login__spinner__bar4"></div>
<div class="samoware-login__spinner__bar5"></div>
<div class="samoware-login__spinner__bar6"></div>
<div class="samoware-login__spinner__bar7"></div>
<div class="samoware-login__spinner__bar8"></div>
<div class="samoware-login__spinner__bar9"></div>
<div class="samoware-login__spinner__bar10"></div>
<div class="samoware-login__spinner__bar11"></div>
<div class="samoware-login__spinner__bar12"></div>
</div> Загрузка
</div>
</form>