-
Notifications
You must be signed in to change notification settings - Fork 176
Open
Description
Hi!
I am working on adding "Reset password" to trestle-auth provided login page. During that I have discovered that my simple controller is not being connected.
First I wanted to add this:
config.hook("auth.login.form.after") do
content_tag(:div, data: { controller: "auth" }, class: "forgot-password-container") do
button_tag "Forgot password?", type: "button", class: "btn btn-link forgot-password-btn", data: { action: "click->auth#forgotPassword" }
end
endThe auth_controller.js:
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
connect() {
console.log("Started")
}
// other code
}Then I tried to see if I am able to load this controller at all in Trestle, so I tried adding this in one of the admin files:
col(sm: 6) { password_field :password_confirmation, data: { controller: "auth" } }Still nothing. I was able to see data-controller="auth" in the source page for given elements, but connect was not ran.
Then I added the same controller to a main page(that is not using Trestle) and the controller connected.
Do I need to add some special configuration?
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels