Changeset 1cca4fb in github


Ignore:
Timestamp:
Dec 1, 2010 6:20:43 AM (2 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
27acfd6
Parents:
53604a0
Message:
  • Allow setting autocomplete attribute for all inputs separately (#1487313)
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r53604a0 r1cca4fb  
    88- Fix cursor position on compose form in Webkit browsers (#1486674) 
    99- Fix setting charset of attachment filenames (#1487122) 
     10- Allow setting autocomplete attribute for all inputs separately (#1487313) 
    1011 
    1112RELEASE 0.5-BETA 
  • config/main.inc.php.dist

    re17553d r1cca4fb  
    181181$rcmail_config['force_https'] = false; 
    182182 
    183 // Allow browser-autocompletion on login form 
    184 $rcmail_config['login_autocomplete'] = false; 
     183// Allow browser-autocompletion on login form. 
     184// 0 - disabled, 1 - username and host only, 2 - username, host, password 
     185$rcmail_config['login_autocomplete'] = 0; 
    185186 
    186187// If users authentication is not case sensitive this must be enabled. 
  • program/include/rcube_template.php

    rfbe24e9 r1cca4fb  
    10461046    { 
    10471047        $default_host = $this->config['default_host']; 
    1048         $attrib['autocomplete'] = $this->config['login_autocomplete'] ? null : 'off'; 
     1048        $autocomplete = (int) $this->config['login_autocomplete']; 
    10491049 
    10501050        $_SESSION['temp'] = true; 
     
    10551055            $url = $_SERVER['QUERY_STRING']; 
    10561056 
    1057         $input_user   = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser') + $attrib); 
    1058         $input_pass   = new html_passwordfield(array('name' => '_pass', 'id' => 'rcmloginpwd') + $attrib); 
     1057        // set atocomplete attribute 
     1058        $user_attrib = $autocomplete > 0 ? array() : array('autocomplete' => 'off'); 
     1059        $host_attrib = $autocomplete > 0 ? array() : array('autocomplete' => 'off'); 
     1060        $pass_attrib = $autocomplete > 1 ? array() : array('autocomplete' => 'off'); 
     1061 
    10591062        $input_action = new html_hiddenfield(array('name' => '_action', 'value' => 'login')); 
    10601063        $input_tzone  = new html_hiddenfield(array('name' => '_timezone', 'id' => 'rcmlogintz', 'value' => '_default_')); 
    10611064        $input_url    = new html_hiddenfield(array('name' => '_url', 'id' => 'rcmloginurl', 'value' => $url)); 
     1065        $input_user   = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser') 
     1066            + $attrib + $user_attrib); 
     1067        $input_pass   = new html_passwordfield(array('name' => '_pass', 'id' => 'rcmloginpwd') 
     1068            + $attrib + $pass_attrib); 
    10621069        $input_host   = null; 
    10631070 
     
    10811088        } 
    10821089        else if (empty($default_host)) { 
    1083             $input_host = new html_inputfield(array('name' => '_host', 'id' => 'rcmloginhost') + $attrib); 
     1090            $input_host = new html_inputfield(array('name' => '_host', 'id' => 'rcmloginhost') 
     1091                + $attrib + $host_attrib); 
    10841092        } 
    10851093 
Note: See TracChangeset for help on using the changeset viewer.