5 Commits
0.9.0 ... 0.9.1

Author SHA1 Message Date
620db83def Bumbed version number 2021-04-10 14:32:27 +02:00
f742dd5e87 Made clearer if updating an existing vote 2021-04-10 14:28:38 +02:00
0095ef14fa Only showing # of responsends if it's > 0 2021-04-10 14:24:09 +02:00
7431986a96 Fixed #17 2021-04-05 15:04:47 +02:00
ff31885c93 Fixed release url 2021-04-05 12:54:10 +02:00
5 changed files with 16 additions and 6 deletions

View File

@ -10,7 +10,8 @@
".git",
".eslintrc",
".nova",
"*.log"
"*.log",
"config.php"
],
"remotePath" : "\/var\/www\/html\/Dragonpolls",
"remoteURL" : "https:\/\/phlaym.net\/Dragonpolls\/",

View File

@ -1,6 +1,6 @@
{
"name": "hutattedonmyarm/dragonpolls",
"version": "0.9.0",
"version": "0.9.1",
"description": "A polling client for pnut.io",
"require": {
"hutattedonmyarm/apnuti": "@dev"

View File

@ -58,7 +58,7 @@ function get_page_footer()
{
$version = json_decode(file_get_contents(__DIR__ . '/composer.json'), true)['version'];
return '</main><footer>'
. '<a href="https://phlaym.net/git/phlaym/Pfadlock/releases/tag/'.$version.'">Version ' . $version . '</a>'
. '<a href="https://phlaym.net/git/phlaym/Dragonpolls/releases/tag/'.$version.'">Version ' . $version . '</a>'
. '<a href="https://phlaym.net/git/phlaym/Dragonpolls" title="Source" class="sourcecode"><div class="linkcontents">'
. file_get_contents(__DIR__.'/icons/src.svg')
. '<span class="linklabel">Source Code</span></div></a>'

7
logout.php Normal file
View File

@ -0,0 +1,7 @@
<?php
require_once __DIR__ .'/bootstrap.php';
$api->logout();
$url = empty($_SERVER['HTTP_REFERER']) ? 'index.php' : $_SERVER['HTTP_REFERER'];
redirect($url);

View File

@ -112,13 +112,15 @@ if (array_key_exists('poll_created', $_GET) && $_GET['poll_created'] == 1) { ?>
$input_type = $poll->max_options === 1 ? 'radio' : 'checkbox';
$input_name = $poll->max_options === 1 ? 'options' : 'options[]';
foreach ($poll->options as $option) {
$checked = $option->is_your_response ? 'checked' : ''; ?>
$checked = $option->is_your_response ? 'checked' : '';
$num_respondents_text = $option->respondents > 0 ? ' (' . $option->respondents . ')' : '';
?>
<div class="option" style="grid-row: <?= $row ?>;">
<input
type="<?= $input_type ?>" <?= $checked.' '.$disabled ?>
value="<?= $option->position ?>"
name="<?= $input_name ?>"/>
<span class="option-text"><?= $option->text . ' (' . $option->respondents . ')'?></span>
<span class="option-text"><?= $option->text . $num_respondents_text?></span>
</div>
<div class="option-responses" style="grid-row: <?= $row++ ?>;grid-column: 2;">
<?php foreach ($option->respondent_ids as $res_id) {
@ -138,7 +140,7 @@ if (array_key_exists('poll_created', $_GET) && $_GET['poll_created'] == 1) { ?>
name="submit_vote"
value="submit" <?= $disabled_button?>
data-can-vote="<?= $data_can_vote ?>">
Vote
<?= count($user_votes) > 0 ? 'Update' : '' ?> Vote
</button>
</form>
</div>