From 2b538227be16a3842afed9a52c317aca2e484e7c Mon Sep 17 00:00:00 2001 From: esanchezm Date: Thu, 21 Aug 2008 21:57:11 +0000 Subject: [PATCH] 2008-08-21 Esteban Sanchez * include/functions_html.php: Added an optional parameter to print_input_text_extended() to allow password inputs. Replaced print_input_password_extended() with print_input_password(). * general/login_page.php: Replaced print_input_password_extended() with print_input_text_extended(). Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1021 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 +++++ pandora_console/general/login_page.php | 4 +- pandora_console/include/functions_html.php | 45 ++++++++-------------- 3 files changed, 27 insertions(+), 31 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 79544d3dcd..5822657cfa 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2008-08-21 Esteban Sanchez + + * include/functions_html.php: Added an optional parameter to + print_input_text_extended() to allow password inputs. Replaced + print_input_password_extended() with print_input_password(). + + * general/login_page.php: Replaced print_input_password_extended() + with print_input_text_extended(). Style correction. + 2008-08-21 Evi Vanoost * index.php: Update HTML for unclosed tags and put everything in PHP diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 9fc4cd3c2d..d6d748fb5c 100644 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -38,10 +38,10 @@ echo '
logo
'.$pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_version : '').' - '.__('Login').':
'.print_input_text_extended ("nick",'', "nick",'','','',false,'','class="login"',true).' + '.__('Login').':
'.print_input_text_extended ("nick", '', "nick", '', '', '' , false, '', 'class="login"', true).' - '.__('Password').':
'.print_input_password_extended ("pass",'', "pass",'','','',false,'','class="login"',true).' + '.__('Password').':
'.print_input_text_extended ("pass", '', "pass", '', '', '' ,false, '', 'class="login"', true, true).' '.print_submit_button ("Login",'',false,'class="sub next"',true).' diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index afe37eb0b7..0e01a7e2ef 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -116,10 +116,13 @@ function print_select_from_sql ($sql, $name, $selected = '', $script = '', $noth * @param string $alt Alternative HTML string. * @param bool $return Whether to return an output string or echo now (optional, echo by default). */ -function print_input_text_extended ($name, $value, $id, $alt, $size, $maxlength, $disabled, $script, $attributes, $return = false) { +function print_input_text_extended ($name, $value, $id, $alt, $size, $maxlength, $disabled, $script, $attributes, $return = false, $password = false) { static $idcounter = 0; ++$idcounter; + + $type = $password ? 'password' : 'text'; + if (empty ($name)) { $name = 'unnamed'; } @@ -132,7 +135,7 @@ function print_input_text_extended ($name, $value, $id, $alt, $size, $maxlength, $maxlength = ' maxlength="'.$maxlength.'" '; } - $output = '