Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix registration_closed corner case #8459

Open
bridgetkromhout opened this issue Oct 1, 2019 · 2 comments
Open

fix registration_closed corner case #8459

bridgetkromhout opened this issue Oct 1, 2019 · 2 comments
Labels

Comments

@bridgetkromhout
Copy link
Collaborator

@mattstratton says it looks like "registration_closed" can take either "true" or "" but not "false". See 7e3b211 for repro. This led to two "Register" buttons.

@mattstratton
Copy link
Member

This is happening because the logic with registration_closed is wonky.

My proposal is to remove the field altogether and have the display of the "Register" button be totally date-driven.

It's tricky since registration_date_end is totally optional; although we should probably make it required (if registration_date_start is set, that is) and suggest that you set it for the date of your event?

Or we can still do some quick checks on if its set at all I guess.

@mattstratton
Copy link
Member

Ah, the end date is NOT optional:

{{- if $e.registration_date_start -}}
          {{- if and (ge now (time $e.registration_date_start)) (le now (time $e.registration_date_end)) -}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

2 participants