mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-10-01 02:28:31 +00:00
Fix the CAPTCHA component failing to render because of an undefined translation function
Macros close over the context of the template that imports them, at import time. Importing the CAPTCHA component from a child template ran before `base.html` defined `_`, so the noscript translation inside the macro failed with an undefined-not-callable error. Import it from `base.html` like every other component.
This commit is contained in:
@@ -16,6 +16,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
{% import "components/errors.html" as errors %}
|
||||
{% import "components/icon.html" as icon %}
|
||||
{% import "components/scope.html" as scope %}
|
||||
{% import "components/captcha.html" as captcha %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ lang }}">
|
||||
|
||||
@@ -9,8 +9,6 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% import "components/captcha.html" as captcha %}
|
||||
|
||||
{% block content %}
|
||||
<header class="page-heading">
|
||||
<div class="icon">
|
||||
|
||||
Reference in New Issue
Block a user