Problem/Motivation
I searched through the old issue tickets, and I saw a bunch of stuff related to "different view after registration," but they all seemed outdated or for Drupal 7, and none of them appear to refer specifically to my problem.
Out of the box, if a user submits a registration and then navigates back to the content type from which they submitted their registration, they continue to be able to see the 'Submit Registration' button as well as a 'Cancel' button. The 'Submit Registration' button should not display if you have already registered. The 'Cancel' button doesn't currently work. If you click 'Cancel', you just get a page refresh. (The 'Cancel' button seems to only be meant for if you start registering and then decide not to register, you can hit cancel instead of submit. If that's the desired use case, then the 'Cancel' button should be hidden after registration. If we want a user to be able to cancel their registration, then it would be nice to have more help text on the button like 'Cancel your registration'.)
An already registered user is also presented with the message, "No valid registration options exist. Registration permissions may need to be adjusted." I propose that message should have more conditions. If the person does not have the proper permissions to register, then keep the message. If the person has registered, then the message should be something like, "You have already registered." With an option to `Review your registration` or at least `Cancel your registration`, I guess depending on if the user has the permission to edit their registration.
Steps to reproduce
Install Drupal core at `10.2.2` and drupal/registration at `3.1.3`. Go through all the basic steps to create a registration and put it on a content type. Sign in as a basic user with the proper permissions to register. Register as that user. Return to the content type with the registration. See that the form is now gone and replaced with a message, but the 'Submit' and 'Cancel' buttons still display, and the buttons don't work.
Proposed resolution
- Remove the 'Submit Registration' button if someone has already submitted
- Either remove the 'Cancel' button if someone has already submitted, or make it operate so that it does allow a user to cancel their registration
- Update the text to read "You have already registered" if the user has already registered, instead of the current misleading "No valid registration options exist"
Issue fork registration-3436901
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
john.oltman commentedThanks for the post, I can confirm this is an issue and will be working on a fix.
Comment #5
john.oltman commentedFixed in dev branch and will be in the next release in April
Comment #6
john.oltman commented