-
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.
- Loading branch information
1 parent
bd9f0c2
commit 240cb22
Showing
1 changed file
with
8 additions
and
20 deletions.
There are no files selected for viewing
28 changes: 8 additions & 20 deletions
28
www/includes/easyparliament/templates/html/alert/_list.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 |
---|---|---|
@@ -1,27 +1,15 @@ | ||
<h3><?= gettext('Your current email alerts') ?></h3> | ||
<hr> | ||
<h3><?= gettext('Email alerts') ?></h3> | ||
|
||
<?php $total_alerts = isset($alerts) ? count($alerts) : 0; ?> | ||
<p><?= sprintf(gettext('You currently have %d email alerts'), $total_alerts) ?></p> | ||
|
||
<a href="/alert/" class="button radius">Check here to see your alerts</a> | ||
|
||
<ul class="alerts-manage__list"> | ||
<?php foreach ($alerts as $alert) { ?> | ||
<li> | ||
<?= sprintf(gettext('When %s'), _htmlspecialchars($alert['criteria'])) ?>. | ||
<form action="<?= $actionurl ?>" method="POST"> | ||
<input type="hidden" name="t" value="<?= _htmlspecialchars($alert['token']) ?>"> | ||
<?php if ($alert['status'] == 'unconfirmed') { ?> | ||
<input type="submit" class="button small" name="action" value="<?= gettext('Confirm') ?>"> | ||
<?php } elseif ($alert['status'] == 'suspended') { ?> | ||
<input type="submit" class="button small" name="action" value="<?= gettext('Resume') ?>"> | ||
<?php } else { ?> | ||
<input type="submit" class="button button--secondary small" name="action" value="<?= gettext('Suspend') ?>"> | ||
<input type="submit" class="button button--negative small" name="action" value="<?= gettext('Delete') ?>"> | ||
<?php } ?> | ||
</form> | ||
</li> | ||
<?php } ?> | ||
</ul> | ||
|
||
<div class="clearfix"> | ||
<form action="<?= $actionurl ?>" method="POST" class="pull-right"> | ||
<input type="hidden" name="t" value="<?= _htmlspecialchars($alert['token']) ?>"> | ||
<!-- No need to reference $alert['token'] here, as you're deleting all alerts --> | ||
<input type="submit" class="button button--negative small" name="action" value="<?= gettext('Delete All') ?>"> | ||
</form> | ||
</div> |