|
|
@ -65,34 +65,63 @@ class Auth_Internal extends Auth_Base {
|
|
|
|
<head>
|
|
|
|
<head>
|
|
|
|
<title>Tiny Tiny RSS</title>
|
|
|
|
<title>Tiny Tiny RSS</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
|
|
</head>
|
|
|
|
<?php foreach (["lib/dojo/dojo.js",
|
|
|
|
<?= stylesheet_tag("themes/light.css") ?>
|
|
|
|
"lib/dojo/tt-rss-layer.js",
|
|
|
|
<body class="ttrss_utility otp">
|
|
|
|
"js/common.js",
|
|
|
|
<h1><?= __("Authentication") ?></h1>
|
|
|
|
"js/utility.js"] as $jsfile) {
|
|
|
|
<div class="content">
|
|
|
|
echo javascript_tag($jsfile);
|
|
|
|
<form action="public.php?return=<?= $return ?>"
|
|
|
|
} ?>
|
|
|
|
method="POST" class="otpform">
|
|
|
|
<style type="text/css">
|
|
|
|
<input type="hidden" name="op" value="login">
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
<input type="hidden" name="login" value="<?= htmlspecialchars($login) ?>">
|
|
|
|
body {
|
|
|
|
<input type="hidden" name="password" value="<?= htmlspecialchars($password) ?>">
|
|
|
|
background : #303030;
|
|
|
|
<input type="hidden" name="bw_limit" value="<?= htmlspecialchars($_POST["bw_limit"] ?? "") ?>">
|
|
|
|
}
|
|
|
|
<input type="hidden" name="safe_mode" value="<?= htmlspecialchars($_POST["safe_mode"] ?? "") ?>">
|
|
|
|
}
|
|
|
|
<input type="hidden" name="remember_me" value="<?= htmlspecialchars($_POST["remember_me"] ?? "") ?>">
|
|
|
|
|
|
|
|
<input type="hidden" name="profile" value="<?= htmlspecialchars($_POST["profile"] ?? "") ?>">
|
|
|
|
body.css_loading * {
|
|
|
|
|
|
|
|
display : none;
|
|
|
|
<fieldset>
|
|
|
|
}
|
|
|
|
<label><?= __("Please enter your one time password:") ?></label>
|
|
|
|
</style>
|
|
|
|
<input autocomplete="off" size="6" name="otp" value=""/>
|
|
|
|
|
|
|
|
<input type="submit" value="Continue"/>
|
|
|
|
<script type="text/javascript">
|
|
|
|
</fieldset>
|
|
|
|
require({cache:{}});
|
|
|
|
</form></div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
const UtilityApp = {
|
|
|
|
document.forms[0].otp.focus();
|
|
|
|
init: function() {
|
|
|
|
</script>
|
|
|
|
require(['dojo/parser', "dojo/ready", 'dijit/form/Button', 'dijit/form/Form',
|
|
|
|
|
|
|
|
'dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser, ready){
|
|
|
|
|
|
|
|
ready(function() {
|
|
|
|
|
|
|
|
parser.parse();
|
|
|
|
|
|
|
|
dijit.byId("otp").focus();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body class="flat ttrss_utility otp css_loading">
|
|
|
|
|
|
|
|
<h1><?= __("Authentication") ?></h1>
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
|
|
|
|
<form dojoType="dijit.form.Form" action="public.php?return=<?= $return ?>" method="post" class="otpform">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php foreach (["login", "password", "bw_limit", "safe_mode", "remember_me", "profile"] as $key) {
|
|
|
|
|
|
|
|
print \Controls\hidden_tag($key, $_POST[$key] ?? "");
|
|
|
|
|
|
|
|
} ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?= \Controls\hidden_tag("op", "login") ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
|
|
|
|
<label><?= __("Please enter your one time password:") ?></label>
|
|
|
|
|
|
|
|
<input id="otp" dojoType="dijit.form.ValidationTextBox" required="1" autocomplete="off" size="6" name="otp" value=""/>
|
|
|
|
|
|
|
|
<?= \Controls\submit_tag(__("Continue")) ?>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|