Skip to content

Commit

Permalink
Merge pull request #6474 from OCHA-DAP/prod
Browse files Browse the repository at this point in the history
Prod to dev
  • Loading branch information
danmihaila authored Nov 5, 2024
2 parents 77095eb + 0ee7088 commit f18c687
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<p>Dear HDX User,</p>

<p>You're subscribing to the <a href="{{ h.url_for('hdx_dataset.read', id=data.dataset_id, _external=True) }}" target="_blank"> {{ data.dataset_title }}</a> dataset.</p>
<p>Please verify your email by clicking the button below:</p>

<a href="{{ data.verify_email_link }}" target="_blank" title="Verify email" class="button">Verify email</a>
Expand Down
26 changes: 13 additions & 13 deletions ckanext-hdx_theme/ckanext/hdx_theme/templates/email/email.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
}

.hdx-email .hdx-content p {
font-size: 20px;
line-height: 180%;
font-size: 16px;
line-height: 140%;
margin-top: 0;
margin-bottom: 15px;
}
Expand All @@ -35,8 +35,8 @@
}

.hdx-email .hdx-content li {
font-size: 20px;
line-height: 150%;
font-size: 16px;
line-height: 130%;
}

.hdx-email .hdx-content a {
Expand All @@ -50,9 +50,9 @@
background-color: #007CE1;
padding: 19px 32px;
font-weight: 600;
margin: 32px 0;
font-size: 16px;
line-height: 125%;
margin: 16px 0;
font-size: 14px;
line-height: 130%;
text-decoration: none;
}

Expand All @@ -64,11 +64,11 @@
}
.hdx-email .hdx-content .quote p {
margin-bottom: 0;
line-height: 150%;
line-height: 130%;
}

.hdx-email .hdx-logo {
padding: 35px;
padding: 25px;
background-color: #F2F2F2;
}

Expand All @@ -77,7 +77,7 @@
}

.hdx-email .hdx-logo img {
width: 110px;
width: 90px;
height: auto;
display: block;
}
Expand Down Expand Up @@ -107,8 +107,8 @@
}

.hdx-email .hdx-footer p {
font-size: 16px;
line-height: 150%;
font-size: 14px;
line-height: 130%;
margin-top: 0;
margin-bottom: 0;
}
Expand All @@ -132,7 +132,7 @@
}

.hdx-email .hdx-logo a {
width: 110px !important;
width: 90px !important;
overflow: hidden !important;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ckanext-hdx_theme/ckanext/hdx_theme/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
hdx_version = 'v1.84.2'
hdx_version = 'v1.84.3'
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def subscribe_to_dataset() -> Response:
try:
token_obj = notification_platform_logic.verify_email_validation_token(token)
except Exception as e:
_h.flash_error('Your token is invalid or has expired. Please try to subscribe again.')
_h.flash_error('Your token is invalid. Your email address might have already been validated.')
EmailValidationAnalyticsSender('notification platform', False, '').send_to_queue()
return tk.redirect_to(dataset_list_url)

Expand Down Expand Up @@ -91,14 +91,17 @@ def subscription_confirmation() -> Response:
hdx_validate_email(email)

token_obj = notification_platform_logic.get_or_generate_email_validation_token(email, dataset_id)
dataset_dict = tk.get_action('package_show')({}, {'id': dataset_id})

subject = u'Please verify your email address'
verify_email_link = _h.url_for(
'hdx_notifications.subscribe_to_dataset',
token=token_obj.token, qualified=True
)
email_data = {
'verify_email_link': verify_email_link
'verify_email_link': verify_email_link,
'dataset_title': dataset_dict.get('title'),
'dataset_id': dataset_id
}
hdx_mailer.mail_recipient([{'email': email}], subject, email_data, footer=None,
snippet='email/content/notification_platform/verify_email.html')
Expand Down

0 comments on commit f18c687

Please sign in to comment.