Commit Graph

35 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan
1d0faedfbc
FIX: Validate number of votes allowed per poll per user. (#15001)
* DEV: Remove spec that we no longer need.

As far as we know, the migration has been successful for a number of
years.

* FIX: Validate number of votes allowed per poll per user.
2021-11-19 09:50:08 +08:00
Gerhard Schlager
81247c1f6a DEV: Remove mention of Transifex from locale files 2020-08-06 13:34:00 +02:00
Mark VanLandingham
5d97286fa7
FEATURE: Allow single option polls (#8853) 2020-02-05 08:03:27 -06:00
Jarek Radosz
9e3fc1111d
FIX: Add a blank poll options validation (#8652)
Before, saving a post with a blank poll option resulted in error 500.
2020-01-03 15:09:36 +01:00
Mark VanLandingham
b92a8131c0
FEATURE: Pie chart option for poll results (#8352) 2019-11-25 11:51:01 -06:00
Rafael dos Santos Silva
fd0025a735
FEATURE: Add export poll button (#8370)
This PR aims to make poll results easily exportable to staff in a CSV format, so they can be analyzed in external software.

It also makes the export data easily customizable by allowing users to leverage any data explorer query to generate the report. By default, we use a query that ships with data explorer, but user can change the ID in settings or use 0 to disable this feature.

One potential upgrade is using the recent work that allows arbitrary group to run data explorer and allow all the groups with access to the configured query to also export polls, but that can be added later.

Co-Authored-By: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2019-11-22 16:06:39 -03:00
Bianca Nenciu
227c45107d FEATURE: Implement Onebox for posts including polls. (#7539) 2019-05-29 17:05:52 +02:00
Gerhard Schlager
0afcad148a DEV: Always use %{count} in pluralized strings 2019-05-20 23:26:22 +02:00
Bianca Nenciu
e49bcebb35 FIX: Validate poll arguments. (#6740)
* FIX: Validate number poll.
* FEATURE: Poll's min can be 0.
* FIX: Fix URL to user profile.
2018-12-31 10:48:30 +01:00
Régis Hanol
4459665dee
REFACTOR: use tables instead of custom fields for polls (#6359)
Co-authored-by: Guo Xiang Tan <tgx_world@hotmail.com>
2018-11-19 14:50:00 +01:00
Régis Hanol
ba14c80b9c FEATURE: automatically close a poll on a given date and time 2018-05-03 02:12:19 +02:00
Guo Xiang Tan
51657d3426 Allow polls to be added/renamed/removed as long as user can edit posts. 2018-03-14 11:00:57 +08:00
Régis Hanol
10139692b2 forgot the error message 2018-02-27 00:25:15 +01:00
Joffrey JAFFEUX
316d814130
FIX: staff should always be allowed to create polls if they are enabled 2017-12-05 00:03:56 +01:00
Joffrey JAFFEUX
76bc173d47
FEATURE: adds poll_allow_staff_to_create
This setting will bypass poll_minimum_trust_level_to_create if set to true
2017-12-04 18:12:17 +01:00
Joffrey JAFFEUX
63bab32816 FEATURE: introduces minimum trust level for polls (#5391)
* FEATURE: introduces minimum trust level for polls

This commit makes `poll_enabled` less misleading and introduces `poll_minimum_trust_level_to_create`. If poll are enabled they will always be cooked, and if you have the required trust level you can create polls. As a side effect, it also fixes a bug where rebaking a post created by staff member when `poll_enabled=false` would end up not cooking it.

It also adds more tests to ensure settings are respected.

* admins should be whitelisted

* checks for admin in post validation

* test for >= instead of == trust level
2017-12-04 14:47:11 +01:00
Guo Xiang Tan
8213da20f2 Extract polls edit window to a site settings. 2016-08-10 15:17:16 +08:00
Guo Xiang Tan
f53494f102 FIX: Polls with votes cannot be made public. 2016-06-09 12:10:27 +08:00
Régis Hanol
515fc49727 FIX: replace polls with a link in emails 2015-10-22 19:10:07 +02:00
Gerhard Schlager
bb52042b46 FIX: Add missing pluralization keys to poll plugin locale 2015-09-27 21:36:57 +02:00
Gerhard Schlager
5eaf95b328 FIX: Remove invalid translation keys from polls plugin
And it changes the file header since it was wrong.
2015-06-28 01:31:03 +02:00
Régis Hanol
c240a8bd80 FIX: make sure we can't vote on deleted polls 2015-06-01 22:31:47 +02:00
Régis Hanol
f736b6face FIX: validate poll parameters when type=multiple 2015-06-01 19:28:05 +02:00
Régis Hanol
c1bb7bc7cc clarify copy when editing a poll after the first 5 minutes 2015-05-07 17:24:35 +02:00
Régis Hanol
2954c99a1e FEATURE: new 'poll_maximum_options' site setting to limit the number of options in a poll 2015-05-01 16:44:51 +02:00
Régis Hanol
f83638c154 FIX: check the selected options when casting a vote 2015-05-01 16:33:24 +02:00
Arpit Jalan
787b30c354 Update Translations 2015-04-29 22:38:29 +05:30
Régis Hanol
c10a8d481d poll copy 2015-04-29 12:25:54 +02:00
Régis Hanol
a737090442 - FEATURE: revamped poll plugin
- add User.staff scope
- inject MessageBus into Ember views (so it can be used by the poll plugin)
- REFACTOR: use more accurate is_first_post? method instead of post_number == 1
- FEATURE: add support for JSON-typed custom fields
- FEATURE: allow plugins to add validation
- FEATURE: add post_custom_fields to PostSerializer
- FEATURE: allow plugins to whitelist post_custom_fields
- FIX: don't bump when post did not save successfully
- FEATURE: polls are supported in any post
- FEATURE: allow for multiple polls in the same post
- FEATURE: multiple choice polls
- FEATURE: rating polls
- FEATURE: new dialect allowing users to preview polls in the composer
2015-04-23 19:33:29 +02:00
Neil Lalonde
0f4014eef1 Update translations 2014-04-24 10:53:04 -04:00
Vikhyat Korrapati
2928ce6ca1 Remove the colon from the poll prefix, drop regex support.
This is needed to make it possible to programmatically toggle between
open and closed polls.
2014-04-11 08:41:37 +05:30
Burke Mamlin
765cf700e3 allow polls to be closed independently of topic 2014-04-08 21:16:29 -04:00
Sébastien Miquerolle
1f71a4d4bc Poll - Topic Term
Use topic instead of thread to keep the same term for the user.
2014-03-17 11:27:41 +01:00
Vikhyat Korrapati
ae3f135c33 Poll Plugin: Allow staff to edit options. 2014-03-16 19:21:17 +05:30
Vikhyat Korrapati
74ab14de19 Add poll plugin. 2014-02-13 07:39:01 +05:30