Skip to content

Commit 705e2c9

Browse files
committed
issue2551077-"jinja2" template: cannot login if German language used.
Fixed three places where the value of a hidden @action input field was translated.They shouldn't be.
1 parent 95e6787 commit 705e2c9

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ Fixed:
6666
- issue2551076 - in responsive template, default searches for bugs and
6767
tasks sets status=new default should be "don't care". (Report:
6868
Ludwig Reiter; Fix: John Rouillard)
69+
- issue2551077 - In "jinja2" template: cannot login if German language
70+
is used. Fixed three places where the value of a hidden @action
71+
input field was translated. (Reported by Ludwig Reiter. John
72+
Rouillard)
6973

7074
2019-10-23 2.0.0 alpha 0
7175

doc/upgrading.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,22 @@ The jinja template has been upgraded to use bootstrap 4.1.3 (from
262262
2.2.2). You can diff/merge changes into your jinja template based
263263
tracker.
264264

265+
Also search _generic.index.html, navigation.html and file.index.html
266+
in the html directory of your tracker. Look for::
267+
268+
<input type="hidden" name="@action"
269+
270+
where the value is a jinja expression that calls i18n.gettext. Set the
271+
value to the argument of the gettext call. E.G. replace::
272+
273+
<input type="hidden" name="@action" value="{{ i18n.gettext('editCSV')|u }}">
274+
275+
with::
276+
277+
<input type="hidden" name="@action" value="editCSV">
278+
279+
The action keywords should not be translated.
280+
265281
Migrating from 1.5.1 to 1.6.0
266282
=============================
267283

share/roundup/templates/jinja2/html/_generic.index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<textarea rows="15" style="width:90%" name="rows">{{ context.csv() }}</textarea>
3636
<br>
3737
<input name="@csrf" type="hidden" value="{{ utils.anti_csrf_nonce() }}">
38-
<input type="hidden" name="@action" value="{{ i18n.gettext('editCSV')|u }}">
38+
<input type="hidden" name="@action" value="editCSV">
3939
<input type="submit" value="{{ i18n.gettext('Edit Items')|u }}">
4040
</form>
4141
{% endif %}

share/roundup/templates/jinja2/html/file.index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h4>{{ i18n.gettext('Files')|u }}</h4>
2424
<form method="POST" action='issue{{ context.id }}'>
2525
<input type="hidden" name="@remove@files" value='{{ file.id }}'>
2626
<input name="@csrf" type="hidden" value="{{ utils.anti_csrf_nonce() }}">
27-
<input type="hidden" name="@action" value="{{ i18n.gettext('edit')|u }}">
27+
<input type="hidden" name="@action" value="edit">
2828
<input type="submit" value="{{ i18n.gettext('remove')|u }}">
2929
</form>
3030
</td>

share/roundup/templates/jinja2/html/layout/navigation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
<a href="user?@template=forgotten">{{ i18n.gettext('Lost your login?')|u }}</a>
140140
</li>
141141
</ul>
142-
<input type="hidden" name="@action" value="{{ i18n.gettext('Login')|u }}">
142+
<input type="hidden" name="@action" value="Login">
143143
<input type="hidden" name="__came_from" value='{{request.base}}{{request.env.PATH_INFO}}'>
144144
</form>
145145
<hr>

0 commit comments

Comments
 (0)