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:
Quentin Gliech
2026-09-21 22:15:29 +02:00
parent a6de208d83
commit dfda70dd8e
2 changed files with 1 additions and 2 deletions
+1
View File
@@ -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 }}">
-2
View File
@@ -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">