Navigation Menu

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

Let plugin developers modify the password confirmation view: new Template.confirmPasswordContent event #16337

Merged
merged 2 commits into from Aug 24, 2020
Merged

Let plugin developers modify the password confirmation view: new Template.confirmPasswordContent event #16337

merged 2 commits into from Aug 24, 2020

Conversation

dominik-th
Copy link
Contributor

Similar to the Template.loginNav event it would be useful to inject custom elements to the password confirmation view as well.

The event consists of two parts, where the parameter is either top or bottom, same as in the Login Template

@Findus23 Findus23 added the Needs Review PRs that need a code review label Aug 22, 2020
@tsteur
Copy link
Member

tsteur commented Aug 23, 2020

Thanks for creating the PR @dominik-th Just to understand things could you let us know about your use case here eg what kind of content you will be adding there? This will help us in the future should there ever be changes.

CHANGELOG.md Outdated
@@ -64,6 +64,7 @@ These are only recommendations (because we will keep backward compatibility for
#### New PHP events

* Added new event `Db.getTablesInstalled`, plugins should use to register the tables they create.
* Added new event `Template.confirmPasswordContent`, plugins can inject HTML content to the password confirmation view.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers for thinking about adding this to the changelog. There's no need though since we don't officially support template events and having it in the changelog might send the wrong message. We won't be simply removing the events and we'll do our best to support them but should the UI or flows change for some reason they might disappear. It's unlikely this will happen in the next few years but wanted to mention it.

@dominik-th
Copy link
Contributor Author

My plugin allows users to create accounts via an openid connect identity provider. These users don't necessarily have a password and get stuck in the password confirmation view.

I want to add a button which redirects the user to the identity provider so they can do the password confirmation on their side if necessary.

Do you want me to remove the changelog entry? It might confuse others if template events aren't officially supported.

@tsteur
Copy link
Member

tsteur commented Aug 24, 2020

Thanks @dominik-th I have removed the changelog entry so I can merge 👍

@tsteur tsteur merged commit 17df746 into matomo-org:4.x-dev Aug 24, 2020
@dominik-th
Copy link
Contributor Author

Thank you @tsteur 😊

@mattab mattab added this to the 4.0.0 milestone Sep 10, 2020
@mattab mattab changed the title Add Template.confirmPasswordContent event Let plugin developers modify the password confirmation view: new Template.confirmPasswordContent event Sep 29, 2020
@mattab mattab added the c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. label Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants