Skip to content

Commit

Permalink
[Cycling UK] Custom page title for login/account creation
Browse files Browse the repository at this point in the history
  • Loading branch information
davea committed Jan 11, 2024
1 parent 1c631e2 commit b6a5440
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/web/base/auth/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

INCLUDE 'header.html', bodyclass='authpage' %]

[% TRY %][% INCLUDE 'auth/_create_title.html' %][% CATCH file %]
<h1>
[% title %]
[% IF NOT expired_password %]
Expand All @@ -17,6 +18,7 @@ <h1>
</small>
[% END %]
</h1>
[% END %]

[% IF forgotten %]
<p>
Expand Down
2 changes: 2 additions & 0 deletions templates/web/base/auth/general.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[% INCLUDE 'header.html', bodyclass='authpage', title = loc('Sign in or create an account') %]

[% TRY %][% INCLUDE 'auth/_general_title.html' %][% CATCH file %]
<h1>
[% loc('Sign in') %]
<small>
[% tprintf(loc('or <a href="%s">create an account</a>'), '/auth/create') %]
</small>
</h1>
[% END %]

[% TRY %][% INCLUDE 'auth/_general_top.html' %][% CATCH file %][% END %]

Expand Down
17 changes: 17 additions & 0 deletions templates/web/cyclinguk/auth/_create_title.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[%
IF forgotten;
title = loc('Forgot password');
ELSIF expired_password;
title = loc('Password expired');
ELSE;
title = "Create a Fill That Hole account";
END %]

<h1>
[% title %]
</h1>
[% IF NOT expired_password %]
<p>
[% tprintf(loc('Or <a href="%s">sign in</a>'), '/auth') %]
</p>
[% END %]
8 changes: 8 additions & 0 deletions templates/web/cyclinguk/auth/_general_title.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<h1>
Sign in to your Fill That Hole account
</h1>

<p><strong>NB this is not the same as a Cycling UK account</strong></p>
<p>
<a href="/auth/create">You can create a Fill That Hole account here</a>
</p>

0 comments on commit b6a5440

Please sign in to comment.