Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Customise the Login Form

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 2815 Views
  • Bruce
    Avatar
    Community Member
    29 Posts

    Customise the Login Form Link to this post

    Hi,
    I'm looking for something which I thought would be simple.
    The login form labels the Username textbox as "Email"
    but my users *don't* use an email for their access ID, .. and are easily confused by this.
    Were do I modify the label in the form?
    (I would like to change the "Email & Password" label in the tab as well)
    ta
    BWS

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: Customise the Login Form Link to this post

    for the tab see the get_name() function in sapphire/security/memberauthenicator.php and also see MemberLoginForm.php for the label text.

  • Bruce
    Avatar
    Community Member
    29 Posts

    Re: Customise the Login Form Link to this post

    ... care to be a little less vague?
    Not being a gun on OOP, I can't seem to pin down exactly *where* in MemberLoginForm.php the label strings are declared.
    //BWS

  • ryanwachtl
    Avatar
    Community Member
    46 Posts

    Re: Customise the Login Form Link to this post

    Hi Bruce,

    Not sure if this is the preferred way to make your changes, but you can edit the labels in your language file. For example in lang/en_US.php

    You can edit the following...

    437 $lang['en_US']['Member']['EMAIL'] = array(
        'Email', //change your Email Label Here
        PR_MEDIUM,
        'Noun'
    );
    481 $lang['en_US']['MemberAuthenticator']['TITLE'] = 'E-mail & Password';
    //your tab label

    Hope that helps some.

  • Matt Hardwick
    Avatar
    Community Member
    61 Posts

    Re: Customise the Login Form Link to this post

    I am using the External Authenticator module, so don't use the default login tab, is there a way to remove the default tab safely?

  • Matt Hardwick
    Avatar
    Community Member
    61 Posts

    Re: Customise the Login Form Link to this post

    Lancer told me where it was in an email;

    You can edit out Authenticator:: stuff in /sapphire/_config.php

  • Bruce
    Avatar
    Community Member
    29 Posts

    Re: Customise the Login Form Link to this post

    t'riffic
    Editing the language file did the job!
    (I scanned thru that earlier, but missed the entry ... bugger)
    ... and thanks for showing the line numbers in your example .. it helped quickly find the offeding entry.

    Also, I actually removed the tab at the top of the form by removing the auth_openid directory, thus suppressing displaying *any* tabs.

    2815 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.