Index: openacs-4/packages/acs-subsite/www/register/recover-password.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/recover-password.tcl,v diff -u -r1.16 -r1.16.2.1 --- openacs-4/packages/acs-subsite/www/register/recover-password.tcl 18 Jun 2018 07:28:49 -0000 1.16 +++ openacs-4/packages/acs-subsite/www/register/recover-password.tcl 10 Apr 2019 21:05:36 -0000 1.16.2.1 @@ -33,17 +33,10 @@ } -# Display form to collect username and authority -set authority_options [auth::authority::get_authority_options] +ad_form -name recover \ + -edit_buttons [list [list [_ acs-kernel.common_continue] ok]] \ + -form { {dummy:text(hidden),optional} } -if { $authority_id eq "" } { - set authority_id [lindex $authority_options 0 1] -} - -ad_form -name recover -edit_buttons [list [list [_ acs-kernel.common_continue] ok]] -form { {dummy:text(hidden),optional} } - - - set username_widget text if { [parameter::get -parameter UsePasswordWidgetForUsername -package_id [ad_acs_kernel_id]] } { set username_widget password @@ -57,19 +50,21 @@ } else { if { [llength $authority_options] > 1 } { ad_form -extend -name recover -form { - {authority_id:integer(select) - {label {[_ acs-kernel.authentication_authority]}} - {options $authority_options} + {authority_id:integer(select) + {label {[_ acs-kernel.authentication_authority]}} + {options [auth::authority::get_authority_options]} } } } - - ad_form -extend -name recover -form [list [list username:text($username_widget) [list label [_ acs-subsite.Username]]]] -validate { - {username - { [acs_user::get_by_username -authority_id $authority_id -username $username] ne "" } - { Could not find username at authority } + + ad_form -extend -name recover \ + -form [list [list username:text($username_widget) [list label [_ acs-subsite.Username]]]] \ + -validate { + {username + { [acs_user::get_by_username -authority_id $authority_id -username $username] ne "" } + { Could not find username at authority } + } } - } set user_id_widget_name username set focus "username"