feat: perf face capture page

pull/14500/head
Aaron3S 1 week ago committed by ZhaoJiSen
parent 33170887f4
commit bdbbebab76

@ -238,7 +238,7 @@ class MFAFaceMixin:
if not self.is_context_success(context): if not self.is_context_success(context):
msg = context.get('error_message', '') msg = context.get('error_message', '')
raise RuntimeError("Face recognition failed,{}".format(msg)) raise RuntimeError(msg)
face_code = context.get('face_code') face_code = context.get('face_code')
if not face_code: if not face_code:

@ -2,28 +2,18 @@
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% block content %} {% block content %}
<style>
.ibox-content {
padding: 0;
}
h2 {
display: none;
}
.ibox-context-margin {
margin: 0;
}
</style>
{% if 'code' in form.errors %} {% if 'code' in form.errors %}
<div class="alert alert-danger" id="messages">
<p class="red-fonts">{{ form.code.errors.as_text }}</p> <p class="red-fonts">{{ form.code.errors.as_text }}</p>
</div>
{% endif %} {% endif %}
<div id="retry_container" style="text-align: center; margin-top: 20px; display: none;">
<button id="retry_button" class="btn btn-primary">{% trans 'Retry' %}</button>
</div>
<form class="m-t" role="form" method="post" action="" style="display: none"> <form class="m-t" role="form" method="post" action="" style="display: none">
{% csrf_token %} {% csrf_token %}
<button id="submit_button" type="submit" style="display: none"></button> <button id="submit_button" type="submit" style="display: none"></button>
@ -40,9 +30,7 @@
</iframe> </iframe>
</div> </div>
<div id="retry_container" style="text-align: center; margin-top: 20px; display: none;">
<button id="retry_button" class="btn btn-primary">{% trans 'Retry' %}</button>
</div>
<script> <script>
$(document).ready(function () { $(document).ready(function () {

Loading…
Cancel
Save