Ticket #1370: Autocomplete bei Admin Inputfeldern verhindern.patch
| File Autocomplete bei Admin Inputfeldern verhindern.patch, 4.8 KB (added by , 8 years ago) |
|---|
-
admin/configuration.php
305 305 $value_field = xtc_call_function($function, $parameters); 306 306 } 307 307 } else { 308 $value_field = xtc_draw_input_field($configuration['configuration_key'], $configuration['configuration_value'], ' style="width:100%;"');308 $value_field = xtc_draw_input_field($configuration['configuration_key'], $configuration['configuration_value'], 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" style="width:100%;"'); 309 309 } 310 310 if (strstr($value_field,'cfg_so_k')) { 311 311 $value_field=str_replace('cfg_so_k',strtolower($configuration['configuration_key']),$value_field); -
admin/includes/functions/general.php
2167 2167 $email_fields .= '<div>'.PHP_EOL; 2168 2168 $email_fields .= xtc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] .'/admin/images/'. $languages[$i]['image'], $languages[$i]['name'], '18px'); 2169 2169 if (trim($parameters[1]) == 'SMTP_PASSWORD') { 2170 $email_fields .= xtc_draw_password_field(trim($parameters[1]).'[' . strtoupper($languages[$i]['code']) . ']', parse_multi_language_value($parameters[0], $languages[$i]['code'], true), false , ' style="margin-left:2px; width:200px"');2170 $email_fields .= xtc_draw_password_field(trim($parameters[1]).'[' . strtoupper($languages[$i]['code']) . ']', parse_multi_language_value($parameters[0], $languages[$i]['code'], true), false , 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" style="margin-left:2px; width:200px"'); 2171 2171 } else { 2172 $email_fields .= xtc_draw_input_field(trim($parameters[1]).'[' . strtoupper($languages[$i]['code']) . ']', parse_multi_language_value($parameters[0], $languages[$i]['code'], true), ' style="margin-left:2px; width:360px"');2172 $email_fields .= xtc_draw_input_field(trim($parameters[1]).'[' . strtoupper($languages[$i]['code']) . ']', parse_multi_language_value($parameters[0], $languages[$i]['code'], true), 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" style="margin-left:2px; width:360px"'); 2173 2173 } 2174 2174 $email_fields .= '</div>'.PHP_EOL; 2175 2175 } -
admin/includes/functions/html_output.php
144 144 145 145 // Output a form password field 146 146 function xtc_draw_password_field($name, $value = '', $required = false, $parameters = '') { 147 $params = strpos($parameters,'maxlength') !== false ? '' : ' maxlength="40"';147 $params = strpos($parameters,'maxlength') !== false ? '' : 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" maxlength="40"'; 148 148 if ($parameters != '') { 149 149 $params .= ' ' . $parameters; 150 150 } -
inc/xtc_draw_password_field.inc.php
16 16 ---------------------------------------------------------------------------------------*/ 17 17 18 18 // Output a form password field 19 function xtc_draw_password_field($name, $value = '', $parameters = ' maxlength="40"') {19 function xtc_draw_password_field($name, $value = '', $parameters = 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" maxlength="40"') { 20 20 return xtc_draw_input_field($name, $value, $parameters, 'password', false); 21 21 } 22 22 23 function xtc_draw_password_fieldNote($name, $value = '', $parameters = ' maxlength="40"') {23 function xtc_draw_password_fieldNote($name, $value = '', $parameters = 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" maxlength="40"') { 24 24 return xtc_draw_input_fieldNote($name, $value, $parameters, 'password', false); 25 25 } 26 26 ?> 27 No newline at end of file
