Skip to content

Commit 7e7fadb

Browse files
committed
Use the actual defaults from settings.py when showing the defaults on /accounts/settings/.
- Legacy-Id: 14941
1 parent 8a4406b commit 7e7fadb

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

ietf/cookies/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ def preferences(request, **kwargs):
99
preferences = request.COOKIES.copy()
1010
new_cookies = {}
1111
del_cookies = []
12+
preferences['defaults'] = settings.USER_PREFERENCE_DEFAULTS
1213
for key in settings.USER_PREFERENCE_DEFAULTS.keys():
1314
if key in kwargs:
1415
if kwargs[key] == None:

ietf/templates/cookies/settings.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h1>User settings</h1>
1717

1818
<h2>How many days is considered "new"?</h2>
1919

20-
<p>This setting affects how many days are considered "new enough" to get the special highlighting in the documents table. Default setting is 14 days.</p>
20+
<p>This setting affects how many days are considered "new enough" to get the special highlighting in the documents table. The default setting is {{ defaults.new_enough }} days.</p>
2121

2222
<div class="btn-group btn-group-justified">
2323
<a class="btn btn-default {% if new_enough == '7' %}active{% endif %}" href="/accounts/settings/new_enough/7">7 days</a>
@@ -30,7 +30,7 @@ <h2>How many days is considered "new"?</h2>
3030

3131
<h2 class="ietf-divider">How many days is considered "soon"?</h2>
3232

33-
<p>This setting tells what is considered "soon" when showing documents that are going to be expire soon. Default setting is 14 days.</p>
33+
<p>This setting tells what is considered "soon" when showing documents that are going to be expire soon. The Default setting is {{ defaults.expires_soon }} days.</p>
3434

3535
<div class="btn-group btn-group-justified">
3636
<a class="btn btn-default {% if expires_soon == '7' %}active{% endif %}" href="/accounts/settings/expires_soon/7">7 days</a>
@@ -43,7 +43,7 @@ <h2 class="ietf-divider">How many days is considered "soon"?</h2>
4343

4444
<h2 class="ietf-divider">Show full document text by default?</h2>
4545

46-
<p>Show the full text immediately on the document page instead of only showing beginning of it. This defaults to off.</p>
46+
<p>Show the full text immediately on the document page instead of only showing beginning of it. This defaults to {{ defaults.full_draft }}.</p>
4747

4848
<div class="btn-group btn-group-justified">
4949
<a class="btn btn-default {% if full_draft == 'off' %}active{% endif %}" href="/accounts/settings/full_draft/off">Off</a>
@@ -52,7 +52,7 @@ <h2 class="ietf-divider">Show full document text by default?</h2>
5252

5353
<h2 class="ietf-divider">Show the left-hand menu?</h2>
5454

55-
<p>Show the left-hand menu on all regular pages? This defaults to on.</p>
55+
<p>Show the left-hand menu on all regular pages? This defaults to {{ defaults.left_menu }}.</p>
5656

5757
<div class="btn-group btn-group-justified">
5858
<a class="btn btn-default {% if left_menu == 'off' %}active{% endif %}" href="/accounts/settings/left_menu/off">Off</a>

0 commit comments

Comments
 (0)