stages/otp_time: fix redirect uri after setup
This commit is contained in:
parent
4ee22f8ec1
commit
f294791d41
|
@ -36,7 +36,9 @@ class OTPTimeStageView(FormView, StageView):
|
||||||
qr_code = QRCode(image_factory=SvgFillImage)
|
qr_code = QRCode(image_factory=SvgFillImage)
|
||||||
qr_code.add_data(device.config_url)
|
qr_code.add_data(device.config_url)
|
||||||
svg_image = tostring(qr_code.make_image().get_image())
|
svg_image = tostring(qr_code.make_image().get_image())
|
||||||
sr_wrapper = f'<div aria-label="{device.config_url}">{force_str(svg_image)}</div>'
|
sr_wrapper = (
|
||||||
|
f'<div aria-label="{device.config_url}">{force_str(svg_image)}</div>'
|
||||||
|
)
|
||||||
return sr_wrapper
|
return sr_wrapper
|
||||||
|
|
||||||
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<p>
|
<p>
|
||||||
{% if not state %}
|
{% if not state %}
|
||||||
{% if stage.configure_flow %}
|
{% if stage.configure_flow %}
|
||||||
<a href="{% url 'passbook_flows:configure' stage_uuid=stage.stage_uuid %}" class="pf-c-button pf-m-primary">{% trans "Enable Time-based OTP" %}</a>
|
<a href="{% url 'passbook_flows:configure' stage_uuid=stage.stage_uuid %}?next={{ request.get_full_path }}" class="pf-c-button pf-m-primary">{% trans "Enable Time-based OTP" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{% url 'passbook_stages_otp_time:disable' stage_uuid=stage.stage_uuid %}" class="pf-c-button pf-m-danger">{% trans "Disable Time-based OTP" %}</a>
|
<a href="{% url 'passbook_stages_otp_time:disable' stage_uuid=stage.stage_uuid %}" class="pf-c-button pf-m-danger">{% trans "Disable Time-based OTP" %}</a>
|
||||||
|
|
Reference in New Issue