Skip to content

Commit d5bbb75

Browse files
committed
move donate message to its own template
1 parent a1aaff8 commit d5bbb75

File tree

4 files changed

+14
-20
lines changed

4 files changed

+14
-20
lines changed

perllib/FYR/TestHarness.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ sub confirm_message {
198198
$url =~ s/\s//gs;
199199
$wth->email_check_url($url);
200200
$wth->browser_get($url);
201-
$wth->browser_check_contents("Your message is on its way.");
201+
$wth->browser_check_contents("Your message is on its way");
202202
my $summary = "a test message to " . name_n($who);
203203
if ($do_survey) {
204204
$wth->browser_submit_form(

templates/website/can-you-help.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div class="card card-lg card-text-center">
2+
<?php $values['donate_shown'] = True; ?>
3+
<h2>
4+
Can you help other people who need to send a message?
5+
</h2>
6+
<p>With your support, we can help more people get their message to the right place.</p>
7+
<a href="https://www.mysociety.org/donate?utm_source=writetothem.com&utm_content=help+others&utm_medium=link&utm_campaign=<?= $values['utm_campaign'] ?>" class="hero__donate__button mysoc-footer__donate__button">Donate now</a>
8+
</div>
9+
<br><br>

templates/website/confirm-accept.html

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
$values['title'] = "We’ll send your message now";
44
$values['robots'] = 'noindex, nofollow';
55
$values['skip_header'] = TRUE;
6+
$values['utm_campaign'] = 'submitted_page';
67

78
template_draw('header', $values);
89

@@ -40,15 +41,7 @@ <h2 class="subtitle">If you have time could you answer a couple of questions?</h
4041
<br><br>
4142

4243
<?php endif; ?>
43-
<div class="card card-md card-text-center">
44-
<?php $values['donate_shown'] = True; ?>
45-
<h2>
46-
Can you help other people who need to send a message?
47-
</h2>
48-
<p>With your support, we can help more people get their message to the right place.</p>
49-
<a href="https://www.mysociety.org/donate?utm_source=writetothem.com&utm_content=help+others&utm_medium=link&utm_campaign=submitted_page" class="hero__donate__button mysoc-footer__donate__button">Donate now</a>
50-
</div>
51-
<br><br>
44+
<?php template_draw('can-you-help', $values) ?>
5245
</div>
5346
</div>
5447

templates/website/survey-thanks.html

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
$values['title'] = "Thanks for your help";
44
$values['robots'] = 'noindex, nofollow';
55
$values['skip_header'] = TRUE;
6+
$values['utm_campaign'] = 'survey_thanks';
67

78
template_draw('header', $values);
89

@@ -26,16 +27,7 @@ <h2>Thanks for your help</h2>
2627
</div>
2728

2829
<br><br><br>
29-
<div class="card card-lg card-text-center">
30-
<?php $values['donate_shown'] = True; ?>
31-
<h2>
32-
Can you help other people who need to send a message?
33-
</h2>
34-
<p>With your support, we can help more people get their message to the right place.</p>
35-
<a href="https://www.mysociety.org/donate?utm_source=writetothem.com&utm_content=help+others&utm_medium=link&utm_campaign=submitted_page" class="hero__donate__button mysoc-footer__donate__button">Donate now</a>
36-
</div>
37-
<br><br>
38-
30+
<?php template_draw('can-you-help', $values) ?>
3931
</div>
4032
</div>
4133

0 commit comments

Comments
 (0)