-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch postcode page to post election screen
- kicks in after 10 (or on post_election = 1) - includes form based on postcode to sign up for alerts
- Loading branch information
Showing
4 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# The polls are closed! | ||
|
||
The UK general election is now over. | ||
|
||
Through Thursday night and into Friday, the votes will be counted, winners announced - and we will be loading the new MPs into TheyWorkForYou. | ||
|
||
We've prepared a [few blog posts and resources](https://www.mysociety.org/?p=54263) to understand the new Parliament - you can read these [on our blog](https://www.mysociety.org/?p=54263). | ||
|
||
___ | ||
|
||
### Get emails about your MP | ||
|
||
There are many new MPs in this election. You can sign up below to get an email when your new/returning MP has spoken, voted, or received a written answer: | ||
|
||
{{ form }} | ||
|
||
___ | ||
|
||
### Support TheyWorkForYou's work in the coming Parliament | ||
|
||
TheyWorkForYou and WriteToThem are run by [mySociety](https://www.mysociety.org/), a small UK charity. | ||
|
||
We're a very efficient operation and do a lot with a small team: at the moment TheyWorkForYou, which is used by millions of people every year, is run with the equivalent of about two people. | ||
|
||
If we had [a *bit* more money, we could achieve a *lot* more]((/support-us/)). | ||
|
||
We want to see a transparent, resilient democracy, with equal access to information, representation and voice for citizens. | ||
|
||
If you believe in this vision [please donate today](/support-us/) to enable greater transparency and accountability of the next government. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
www/includes/easyparliament/templates/html/postcode/ge2024-post-election.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
|
||
<?php ob_start(); ?> | ||
<form class="alerts-form" method="post" action="/alert/by-postcode/"> | ||
<input type="hidden" name="add-alert" value="1"> | ||
<input type="hidden" name="postcode" id="id_postcode" value="<?= strtoupper($data["pc"]) ?>"> | ||
|
||
<label for="id_email">Your email address</label> | ||
<input type="text" name="email" id="id_email"> | ||
|
||
<button type="submit" class="button radius">Set up alerts</button> | ||
</form> | ||
<?php $form = ob_get_clean(); ?> | ||
|
||
|
||
<?php | ||
$markdown_file = '../../../markdown/post-election.md'; | ||
$Parsedown = new \Parsedown(); | ||
|
||
$text = file_get_contents($markdown_file); | ||
$html = $Parsedown->text($text); | ||
|
||
$html = str_replace("{{ form }}", $form, $html); | ||
|
||
echo $html; | ||
?> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters