From 8216bcbaa665a563470ac7fd5126e35033a20bc4 Mon Sep 17 00:00:00 2001 From: ecmu Date: Sun, 13 Mar 2016 16:20:38 +0100 Subject: [PATCH] #51 : make empty vote different from 'No' --- app/classes/Framadate/Repositories/VoteRepository.php | 2 +- tpl/part/vote_table_classic.tpl | 5 ++++- tpl/part/vote_table_date.tpl | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/classes/Framadate/Repositories/VoteRepository.php b/app/classes/Framadate/Repositories/VoteRepository.php index 9008c5a..efd7b36 100644 --- a/app/classes/Framadate/Repositories/VoteRepository.php +++ b/app/classes/Framadate/Repositories/VoteRepository.php @@ -18,7 +18,7 @@ class VoteRepository extends AbstractRepository { } function insertDefault($poll_id, $insert_position) { - $prepared = $this->prepare('UPDATE `' . Utils::table('vote') . '` SET choices = CONCAT(SUBSTRING(choices, 1, ?), "0", SUBSTRING(choices, ?)) WHERE poll_id = ?'); + $prepared = $this->prepare('UPDATE `' . Utils::table('vote') . '` SET choices = CONCAT(SUBSTRING(choices, 1, ?), " ", SUBSTRING(choices, ?)) WHERE poll_id = ?'); //#51 : default value for unselected vote return $prepared->execute([$insert_position, $insert_position + 1, $poll_id]); } diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl index f2a6f2d..e5b9836 100644 --- a/tpl/part/vote_table_classic.tpl +++ b/tpl/part/vote_table_classic.tpl @@ -74,6 +74,9 @@ {__('Generic', 'No')} +
  • {* #51 : default value for unselected vote *} + +
  • {/foreach} @@ -297,4 +300,4 @@ {/if} -{/if} \ No newline at end of file +{/if} diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index 0c3554c..ecfa39b 100644 --- a/tpl/part/vote_table_date.tpl +++ b/tpl/part/vote_table_date.tpl @@ -122,6 +122,9 @@ {__('Generic', 'No')} +
  • {* #51 : default value for unselected vote *} + +
  • {/foreach} @@ -352,4 +355,4 @@ {/if} -{/if} \ No newline at end of file +{/if}