gustafn
committed
on 23 Jan 09
bump version number to make sure, apm picks up the newest version
openacs-4/.../acs-subsite/lib/user-info.tcl (+10 -5)
201 201                
202 202             # Element messages
203 203             foreach { elm_name elm_error } $result(element_messages) {
204 204                 form set_error user_info $elm_name $elm_error
205 205             }
206 206             break
207 207         }
208 208     }
209 209  
210 210 } -after_submit {
211 211     if {[ad_conn account_status] eq "closed"} {
212 212         auth::verify_account_status
213 213     }
214 214    
215 215     ad_returnredirect $return_url
216 216     ad_script_abort
217 217 }
218 218
219 219 # LARS HACK: Make the URL and email elements real links
220 220 if { ![form is_valid user_info] } {
221       element set_properties user_info email -display_value "<a href=\"mailto:[element get_value user_info email]\">[element get_value user_info email]</a>"
222       if {![string match -nocase "http://*" [element get_value user_info url]]} {
223           element set_properties user_info url -display_value \
224                   "<a href=\"http://[element get_value user_info url]\">[element get_value user_info url]</a>"
  221     element set_properties user_info email \
  222         -display_value "<a href=\"mailto:[element get_value user_info email]\">[element get_value user_info email]</a>"
  223    
  224     set url [element get_value user_info url]
  225     if {   ![string match -nocase "http://*" $url]
  226         && ![string match -nocase "https://*" $url]
  227     } {
  228         element set_properties user_info url \
  229             -display_value "<a href=\"http://$url\">$url</a>"
225 230     } else {
226 231         element set_properties user_info url -display_value \
227                   "<a href=\"[element get_value user_info url]\">[element get_value user_info url]</a>"
  232                 "<a href=\"$url\">$url</a>"
228 233     }
229 234 }
230 235
231 236 # Local variables:
232 237 #    mode: tcl
233 238 #    tcl-indent-level: 4
234 239 #    indent-tabs-mode: nil
235 240 # End: