Skip to content

Commit 22cee25

Browse files
committed
reworked network_name to be a global site setting
1 parent 5b77efd commit 22cee25

12 files changed

Lines changed: 24 additions & 21 deletions

File tree

app/views/complaints_mailer/legal_deletion.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626

2727
<p>
2828
Thanks for your understanding.<br/>
29-
<%= t 'platform.network_name' %> Community Team
29+
<%= SiteSetting['NetworkName'] %> Community Team
3030
</p>

app/views/layouts/_head.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<meta charset="utf-8" />
22
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
33
<meta name="viewport" content="width=device-width, initial-scale=1" />
4-
<% desc = "#{SiteSetting['SiteName']} on #{t('platform.network_name')} - open, community-run Q&A knowledge sharing" %>
4+
<% desc = "#{SiteSetting['SiteName']} on #{SiteSetting['NetworkName']} - open, community-run Q&A knowledge sharing" %>
55
<meta name="description" content="<%= content_for?(:description) ? content_for(:description) : desc %>" />
66

77
<% page_title = (Rails.env.development? ? '[DEV] ' : '') +

app/views/two_factor_mailer/backup_code.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<h3>Your two-factor authentication backup code</h3>
44

55
<p>
6-
You're receiving this email because you have two-factor authentication enabled on your Codidact network account. We've
7-
recently added backup codes for every account using 2FA, so that you can still log in if you lose access to your
6+
You're receiving this email because you have two-factor authentication enabled on your <%= SiteSetting['NetworkName'] %> network account.
7+
We've added backup codes for every account using 2FA, so that you can still log in if you lose access to your
88
authenticator app.
99
</p>
1010

app/views/two_factor_mailer/backup_code.text.erb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ Hi <%= @user&.username %>,
22

33
Re: Your two-factor authentication backup code
44

5-
6-
You're receiving this email because you have two-factor authentication enabled on your Codidact network account. We've
7-
recently added backup codes for every account using 2FA, so that you can still log in if you lose access to your
5+
You're receiving this email because you have two-factor authentication enabled on your <%= SiteSetting['NetworkName'] %> network account.
6+
We've added backup codes for every account using 2FA, so that you can still log in if you lose access to your
87
authenticator app.
98

109
Your backup code can be found in your user account settings, under Two-Factor Authentication settings. Please save it
1110
somewhere safe. Please note that logging in using this backup code will disable 2FA on your account so that you can
1211
reconfigure it using a new app or device &mdash; this will also reset your backup code.
1312

1413
Thanks,
15-
The Codidact Team
14+
The <%= SiteSetting['NetworkName'] %> Team
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h3>Disable two-factor authentication</h3>
22
<p>
3-
Someone recently requested a link to turn off two-factor authentication on your Codidact account.
3+
Someone recently requested a link to turn off two-factor authentication on your <%= SiteSetting['NetworkName'] %> account.
44
If that was you, great! <%= link_to 'Use this link to disable 2FA', two_factor_disable_link_url(@token, host: @host) %>
55
</p>
66

7-
<p>If this wasn't you, you should <%= link_to 'change your password', edit_user_registration_url(host: @host) %></p>
7+
<p>If this wasn't you, you should <%= link_to 'change your password', edit_user_registration_url(host: @host) %></p>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Disable two-factor authentication ###
22

3-
Someone recently requested a link to turn off two-factor authentication on your Codidact account.
3+
Someone recently requested a link to turn off two-factor authentication on your <%= SiteSetting['NetworkName'] %> account.
44
If that was you, great! Use this link to disable 2FA: <%= two_factor_disable_link_url(@token, host: @host) %>
55

6-
If this wasn't you, you should change your password: <%= edit_user_registration_url(host: @host) %>
6+
If this wasn't you, you should change your password: <%= edit_user_registration_url(host: @host) %>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<h3>Welcome back to Codidact!</h3>
1+
<h3>Welcome back to <%= SiteSetting['NetworkName'] %>!</h3>
22
<p><%= link_to 'Use this link to sign in', qr_login_url(@token, host: @host) %></p>
3-
<p>We'll see you soon!</p>
3+
<p>We'll see you soon!</p>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
### Welcome back to Codidact! ###
1+
### Welcome back to <%= SiteSetting['NetworkName'] %>! ###
22

33
Use this link to sign in: <%= qr_login_url(@token, host: @host) %>
44

5-
We'll see you soon!
5+
We'll see you soon!

app/views/user_mailer/deletion_confirmation.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p class="has-font-size-caption">
22
<em>
33
You are receiving this email because you have <%= user_link @user, { host: @host }, anchortext: 'an account' %> on the
4-
<%= t('platform.network_name') %> network.
4+
<%= SiteSetting['NetworkName'] %> network.
55
</em>
66
</p>
77

app/views/users/qr_login_code.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="notice is-warning">
88
<p><i class="fas fa-exclamation-triangle"></i> <strong>Caution</strong></p>
99
<p>
10-
The QR code below, when scanned, provides immediate access to your <%= t 'platform.network_name' %> network account,
10+
The QR code below, when scanned, provides immediate access to your <%= SiteSetting['NetworkName'] %> network account,
1111
without asking for your password again. This makes it easier to sign in on your phone, but make sure nobody's
1212
looking over your shoulder! Take extra care in public places.
1313
</p>

0 commit comments

Comments
 (0)