-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unscheduled notification sending is working
Updates #151
- Loading branch information
Showing
11 changed files
with
159 additions
and
25 deletions.
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
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,30 @@ | ||
<?php | ||
/** | ||
* @copyright 2018 City of Bloomington, Indiana | ||
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt | ||
* @param Event $this->event | ||
* @param string $this->type | ||
* @param string $this->comments | ||
*/ | ||
declare (strict_types=1); | ||
use Blossom\Classes\Block; | ||
use Blossom\Classes\Template; | ||
?> | ||
<section> | ||
<form method="post"> | ||
<fieldset> | ||
<pre> | ||
<?php | ||
$template = new Template('default', 'txt'); | ||
$block = new Block("notifications/{$this->type}.inc", ['event'=>$this->event]); | ||
echo $block->render('txt', $template); | ||
?> | ||
</pre> | ||
<input name="event_id" type="hidden" value="<?= $this->event->getId(); ?>" /> | ||
<input name="type" type="hidden" value="<?= $this->type; ?>" /> | ||
|
||
<button type="submit" class="notify"><?= $this->_('send'); ?></button> | ||
<a class="cancel button" href="<?= BASE_URI; ?>/events/view?id=<?= $this->event->getId(); ?>"><?= $this->_('cancel'); ?></a> | ||
</fieldset> | ||
</form> | ||
</section> |
File renamed without changes.
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,9 @@ | ||
<?php | ||
/** | ||
* @copyright 2018 City of Bloomington, Indiana | ||
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt | ||
* @param Event $this->event | ||
*/ | ||
declare (strict_types=1); | ||
$this->_include('events/partials/emailHeader.inc'); | ||
$this->_include('events/info.inc'); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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,24 @@ | ||
<?php | ||
/** | ||
* @copyright 2018 City of Bloomington, Indiana | ||
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt | ||
*/ | ||
declare (strict_types=1); | ||
namespace Application\Views\Notifications; | ||
|
||
use Application\Models\Event; | ||
use Blossom\Classes\Block; | ||
use Blossom\Classes\Template; | ||
|
||
class Preview extends Template | ||
{ | ||
public function __construct(Event $event, string $type) | ||
{ | ||
parent::__construct('admin', 'html'); | ||
|
||
$this->blocks[] = new Block('notifications/sendForm.inc', [ | ||
'event' => $event, | ||
'type' => $type | ||
]); | ||
} | ||
} |
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,21 @@ | ||
<?php | ||
/** | ||
* @copyright 2018 City of Bloomington, Indiana | ||
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt | ||
*/ | ||
declare (strict_types=1); | ||
namespace Application\Views; | ||
|
||
use Blossom\Classes\Block; | ||
use Blossom\Classes\Template; | ||
|
||
class ValidationErrorView extends Template | ||
{ | ||
public function __construct(array $errors) | ||
{ | ||
header('HTTP/1.1 422 Unprocessable Entity', true, 422); | ||
|
||
parent::__construct('admin', 'html', $vars); | ||
$this->blocks[] = new Block('errorMessages.inc', ['errorMessages' => $errors]); | ||
} | ||
} |
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