Author Topic: edit login screen  (Read 4921 times)

Offline klompie

  • Newbie
  • *
  • Posts: 2
edit login screen
« on: July 19, 2008, 01:59:30 PM »
I want to make a small modification in my login screen but don't know how to do that...

i want to ad my domain after the username field

i found the place where i can edit it:
/roundcubemail-0.2-alpha/program/include/rcube_template.php

    private function login_form($attrib)
    {
        
$default_host $this->config['default_host'];

        
$_SESSION['temp'] = true;

        
$input_user   = new html_inputfield(array('name' => '_user''id' => 'rcmloginuser''size' => 20'autocomplete' => 'off'));
        
$input_pass   = new html_passwordfield(array('name' => '_pass''id' => 'rcmloginpwd''size' => 30));
        
$input_action = new html_hiddenfield(array('name' => '_action''value' => 'login'));
        
$input_host   null;

        if (
is_array($default_host)) {
            
$input_host = new html_select(array('name' => '_host''id' => 'rcmloginhost'));

            foreach (
$default_host as $key => $value) {
                if (!
is_array($value)) {
                    
$input_host->add($value, (is_numeric($key) ? $value $key));
                }
                else {
                    
$input_host null;
                    break;
                }
            }
        }
        else if (!
strlen($default_host)) {
            
$input_host = new html_inputfield(array('name' => '_host''id' => 'rcmloginhost''size' => 30));
        }

        
$form_name  = !empty($attrib['form']) ? $attrib['form'] : 'form';
        
$this->add_gui_object('loginform'$form_name);

        
// create HTML table with two cols
        
$table = new html_table(array('cols' => 2));

        
$table->add('title'html::label('rcmloginuser'Q(rcube_label('username'))));
        
$table->add(null$input_user->show(get_input_value('_user'RCUVE_INPUT_POST)));

        
$table->add('title'html::label('rcmloginpwd'Q(rcube_label('password'))));
        
$table->add(null$input_pass->show());



as you can see i edited $input_user so i have some place to put my domain.
but how do i put some text after the input field??


Offline klompie

  • Newbie
  • *
  • Posts: 2
edit login screen
« Reply #1 on: July 22, 2008, 07:54:24 AM »
Solved it:
$table->add(null, $input_user->show(get_input_value('_user', RCUVE_INPUT_POST))."@domain.com");

Offline rogernem

  • Newbie
  • *
  • Posts: 3
edit login screen
« Reply #2 on: February 12, 2010, 12:05:57 PM »
How can I make that to appear INSIDE the input field?

--------------------
user@domain.com   |
--------------------

Another thing?
How can I make the $input_user to be a dropdown?
Ive tried

$input_user   = new html_select(array('name' => '_user', 'id' => 'rcmloginuser'));
$input_host->add('user@domain.com', 'user@domain.com'));
$input_host->add('user2@domain.com', 'user2@domain.com'));

Didnt work :(

Any ideas?