Minor fixes

This commit is contained in:
Mohamed El-Kalioby
2022-10-16 20:53:32 +03:00
parent 52e307ef0e
commit 0ab710e503
2 changed files with 10 additions and 4 deletions

View File

@@ -33,7 +33,7 @@
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group">
<div class="form-label-group"> <div class="form-label-group">
<input type="text" id="inputUsername" name="username" class="form-control" placeholder="username" required="required" autofocus="autofocus" autocomplete="username webauthn"> <input type="text" id="inputUsername" name="username" class="form-control" placeholder="username" required autofocus autocomplete="username webauthn">
<label for="inputUsername">Username</label> <label for="inputUsername">Username</label>
</div> </div>
</div> </div>
@@ -45,7 +45,10 @@
</div> </div>
<button class="btn btn-primary btn-block" type="submit">Login</button><br/> <button class="btn btn-primary btn-block" type="submit">Login</button><br/>
</form> </form>
<button class="btn btn-primary btn-block" onclick="authen()">Login By PassKeys</button><br/>
</div> </div>
</div> </div>
</div> </div>
@@ -58,7 +61,7 @@
<script src="{% static 'vendor/jquery-easing/jquery.easing.min.js'%}"></script> <script src="{% static 'vendor/jquery-easing/jquery.easing.min.js'%}"></script>
{% include 'FIDO2/FormFill.html' %} {% include 'FIDO2/FormFill.html' %}
{# {% include 'FIDO2/Auth_JS.html' %}#} {# {% include 'FIDO2/Auth_JS.html' with delay=True %}#}
</body> </body>
</html> </html>

View File

@@ -64,8 +64,11 @@
ua=new UAParser().getResult() ua=new UAParser().getResult()
if (ua.browser.name == "Safari" || ua.browser.name == "Mobile Safari" || ua.os.name == "iOS" || ua.os.name == "iPadOS") if (ua.browser.name == "Safari" || ua.browser.name == "Mobile Safari" || ua.os.name == "iOS" || ua.os.name == "iPadOS")
$("#res").html("<button class='btn btn-success' onclick='authen()'>Authenticate...</button>") $("#res").html("<button class='btn btn-success' onclick='authen()'>Authenticate...</button>")
else else {
authen() {% if delay != True and not conditionalUI%}
authen()
{% endif %}
}
} }
}); });