Index: openacs-4/packages/acs-subsite/lib/user-info.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/user-info.adp,v
diff -u -r1.8 -r1.8.8.1
--- openacs-4/packages/acs-subsite/lib/user-info.adp 21 Mar 2005 22:16:24 -0000 1.8
+++ openacs-4/packages/acs-subsite/lib/user-info.adp 29 Mar 2008 17:16:36 -0000 1.8.8.1
@@ -1,3 +1,4 @@
+@focus;noquote@
Index: openacs-4/packages/acs-subsite/lib/user-info.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/user-info.tcl,v
diff -u -r1.18 -r1.18.2.1
--- openacs-4/packages/acs-subsite/lib/user-info.tcl 14 May 2007 20:30:24 -0000 1.18
+++ openacs-4/packages/acs-subsite/lib/user-info.tcl 29 Mar 2008 17:16:36 -0000 1.18.2.1
@@ -40,14 +40,7 @@
foreach elm $read_only_elements {
set elm_mode($elm) {display}
}
-set first_element {}
-foreach elm $form_elms {
- if { $elm_mode($elm) eq "" && ($elm ne "username" && [auth::UseEmailForLoginP]) } {
- set first_element $elm
- break
- }
-}
-set focus "user_info.$first_element"
+
set edit_mode_p [expr ![empty_string_p [form::get_action user_info]]]
set form_mode display
@@ -69,7 +62,10 @@
{options {[auth::authority::get_authority_options]}}
}
}
+} else {
+ lappend read_only_elements authority_id
}
+
if { $user(authority_id) != [auth::authority::local] || ![auth::UseEmailForLoginP] || \
([acs_user::site_wide_admin_p] && [llength [auth::authority::get_authority_options]] > 1) } {
ad_form -extend -name user_info -form {
@@ -78,8 +74,19 @@
{mode $elm_mode(username)}
}
}
+} else {
+ lappend read_only_elements username
}
+set first_element {}
+foreach elm $form_elms {
+ if { $elm_mode($elm) eq "" && ( [lsearch $read_only_elements $elm] eq -1) } {
+ set first_element $elm
+ break
+ }
+}
+set focus "user_info.$first_element"
+
# TODO: Use get_registration_form_elements, or auto-generate the form somehow? Deferred.
Index: openacs-4/packages/acs-subsite/www/user/basic-info-update.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/basic-info-update.tcl,v
diff -u -r1.12 -r1.12.2.1
--- openacs-4/packages/acs-subsite/www/user/basic-info-update.tcl 29 May 2007 05:38:13 -0000 1.12
+++ openacs-4/packages/acs-subsite/www/user/basic-info-update.tcl 29 Mar 2008 17:16:37 -0000 1.12.2.1
@@ -26,6 +26,6 @@
set user_info_template [parameter::get -parameter "UserInfoTemplate" -package_id $subsite_id]
ns_log Notice "user:: $user_info_template"
if {$user_info_template eq ""} {
- set user_info_template "/packages/acs-subsite/lib/user_info"
+ set user_info_template "/packages/acs-subsite/lib/user-info"
}