Customize Login Screen
I'm wondering if it's possible to modify the login screen popup. I looked through all the files in this repo and for the life of me couldn't figure out where to change anything. Maybe I just don't know how Discourse plugins work. I need a way to add a "Register" button to the page (linking to an external site) and to change the title from "LDAP Authentication" to something else.
Also is there any reason it couldn't open in a new tab instead? Seems less intrusive that way.
You can customize the styling by editing https://github.com/jonmbake/discourse-ldap-auth/blob/master/css/form.css. You could change the title from "LDAP Authentication" to something else by passing in a title attribute here: https://github.com/jonmbake/discourse-ldap-auth/blob/master/plugin.rb#L38.
The overall structure of the login form is defined by omniauth so I don't think there is an easy way to add buttons, etc.
@jonmbake Would you accept a PR that adds a Discourse setting for the title attribute?
Hi Jon,
I'm not sure i understand this properly. I am trying to
- change the text on the login button that currently says "with LDAP"
- change the the header on the popup that says "LDAP Authentication"
You wrote
You could change the title from "LDAP Authentication" to something else by passing in a
titleattribute here: https://github.com/jonmbake/discourse-ldap-auth/blob/master/plugin.rb#L38.
So what i did was:
cd /var/discourcse ./launcher enter app vi plugins/discourse-ldap-auth/plugin.rb
and edited line 38 from: uid: SiteSetting.ldap_uid, to uid: SiteSetting.title, (i also just tried typing what i wanted it to say in plain text too)
and it didn't work. Note that the i modified lines 81 and 82 to be:
auth_provider title: 'with your NETNAME', message: 'Log in with your NETNAME credentials',
What should i be doing instead? Thanks so much!
@thomasbeaudry Hmmm... changing the auth_provider title should work. Maybe checkout Discourse source to see where they are pulling those values from?
auth_provider
Page source shows:
;title_override":"with LDAP","message_override":"Log in with your LDAP
Is there something i have to do after i change auth_provider title for my discourse to take note that it changed?
Hi, is there any way we can include placeholders for the username and password for input fields and also change the text in the sign-in button. Thank you