diff options
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/components/poll_form.js | 5 | ||||
-rw-r--r-- | app/validators/poll_validator.rb | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/poll_form.js b/app/javascript/flavours/glitch/features/compose/components/poll_form.js index 21b5d3d73..a47b3799d 100644 --- a/app/javascript/flavours/glitch/features/compose/components/poll_form.js +++ b/app/javascript/flavours/glitch/features/compose/components/poll_form.js @@ -144,6 +144,7 @@ class PollForm extends ImmutablePureComponent { </select> <select value={expiresIn} onChange={this.handleSelectDuration}> + <option value={60}>{intl.formatMessage(messages.minutes, { number: 1 })}</option> <option value={300}>{intl.formatMessage(messages.minutes, { number: 5 })}</option> <option value={1800}>{intl.formatMessage(messages.minutes, { number: 30 })}</option> <option value={3600}>{intl.formatMessage(messages.hours, { number: 1 })}</option> @@ -151,6 +152,10 @@ class PollForm extends ImmutablePureComponent { <option value={86400}>{intl.formatMessage(messages.days, { number: 1 })}</option> <option value={259200}>{intl.formatMessage(messages.days, { number: 3 })}</option> <option value={604800}>{intl.formatMessage(messages.days, { number: 7 })}</option> + <option value={1209600}>{intl.formatMessage(messages.days, { number: 14 })}</option> + <option value={2592000}>{intl.formatMessage(messages.days, { number: 30 })}</option> + <option value={5184000}>{intl.formatMessage(messages.days, { number: 60 })}</option> + <option value={7776000}>{intl.formatMessage(messages.days, { number: 90 })}</option> </select> </div> </div> diff --git a/app/validators/poll_validator.rb b/app/validators/poll_validator.rb index 9efe5d567..10e0b8413 100644 --- a/app/validators/poll_validator.rb +++ b/app/validators/poll_validator.rb @@ -3,8 +3,8 @@ class PollValidator < ActiveModel::Validator MAX_OPTIONS = 6 MAX_OPTION_CHARS = 111 - MAX_EXPIRATION = 1.month.freeze - MIN_EXPIRATION = 5.minutes.freeze + MAX_EXPIRATION = 6.months.freeze + MIN_EXPIRATION = 1.minute.freeze def validate(poll) current_time = Time.now.utc |