News and Announcements => General Discussion => Topic started by: furman12 on February 08, 2010, 11:20:57 AM
Title: Custom login page
Post by: furman12 on February 08, 2010, 11:20:57 AM
Hey, I want make my own login page, I found only this in skins/default/templates/login.html, but it isn't normal form. Can u help me with creating login page? I want to delete server form and add my own
" style="margin:0 11px" />
Title: Custom login page
Post by: SKaero on February 08, 2010, 11:43:05 AM
RoundCube generates the login forum, you should be able to fully edit it useing css, if you want to create a forum to login to RoundCube from else where try using the Autologin plugin Plugin_Repository ? Roundcube Webmail (http://trac.roundcube.net/wiki/Plugin_Repository)
Title: Custom login page
Post by: furman12 on February 27, 2010, 06:42:12 AM
I found this:// add host selection row if (is_object($input_host)) { $table->add('title', html::label('rcmloginhost', Q(rcube_label('server')))); $table->add(null, $input_host->show(get_input_value('_host', RCUBE_INPUT_POST))); }
How to change it to html
Title: Custom login page
Post by: JohnDoh on February 27, 2010, 07:03:19 AM
are you trying to make a select box for the imap server? this can be done from the config ([rc root]/config/main.inc.php)
Title: Re: Custom login page
Post by: Tomasci on January 30, 2016, 05:51:47 AM
Hello,
I would also like to make a custom login page. But I want to change the login form that is generated. I do not want to use labels, but placeholders, like you can see in the attachment.
How can I change this?
Thank you
Title: Re: Custom login page
Post by: SKaero on January 30, 2016, 06:28:09 AM
What you want to do is unfortunately not simple. The only way I can think to do it without modifying core files is creating a javascript file that adds the placeholder text to the input fields.
Title: Re: Custom login page
Post by: Tomasci on January 30, 2016, 06:45:34 AM
Hi, thank you for assistance.
So I will have to include a new js file <roundcube:include file="/includes/newfile.js"> ? I understand correct?
But what to put in that file? I am newbie to coding, only got basics CSS and HTML right now. :'(
Title: Re: Custom login page
Post by: SKaero on January 30, 2016, 07:42:17 AM
Thats about right, you don't need the script tags in the js file and you probably want to make sure the dom is ready before you try to add the placeholder. Roundcube has jQuery so you should be able do it with the following:
Then I created the file custom-login.js in my skins folder /includes (not using Larry). You can see I also try to use the language string as a placeholder. That is not necessary but it would be nice. This is what I got so far in custom-login.js:
Thanks again for helping on this matter. Much appreciated! :)
Title: Re: Custom login page
Post by: SKaero on February 01, 2016, 10:21:11 AM
Your Javascript code is invalid because of the document ready that you added. You also wont be able to access the roundcube:label object since that is only used by the Roundcube templating engine. The following should work:
Title: Re: Custom login page
Post by: Tomasci on February 01, 2016, 08:45:57 PM
Hello again.
That's great. The script now loads and is visible in source code. But placeholders are not yet visible.
So I wonder if there must be some extra line of code to execute the script?
Many thanks
Title: Re: Custom login page
Post by: SKaero on February 01, 2016, 10:08:43 PM
The problem is the script to load the placeholder text is using jQuery and jQuery hasn't been loaded when you include the script. Move the <script> tag to the bottom of the file and it should work.
Title: Re: Custom login page
Post by: Tomasci on February 02, 2016, 04:45:46 AM
Great! That indeed solved it. Many many thanks. ;D :D