From dbb3ecdb133caed4ce7349111bb3b7110d8cf8ca Mon Sep 17 00:00:00 2001 From: ikawhero Date: Fri, 12 Jan 2007 12:15:53 +0000 Subject: [PATCH] Fixing the table - accessibility and strrrrrrict --- user/profile/index.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/user/profile/index.php b/user/profile/index.php index affbd6bf9c..98f45f6cbc 100644 --- a/user/profile/index.php +++ b/user/profile/index.php @@ -232,31 +232,31 @@ if ( ($action == 'editcategory' )) { (count_records_select('user_info_field', '1') > 0) ) and ( $categories = get_records_select('user_info_category', '1', 'sortorder ASC')) ) { unset ($table); - $table->align = array('left', 'right'); + $table->head = array(get_string('profilecategory','admin'),get_string('profilefield','admin'),get_string('edit')); + $table->align = array('left','left','right'); $table->width = '95%'; $table->data = array(); + + $firstflag = true; foreach ($categories as $category) { - $table->data[] = array($category->name, profile_category_icons($category)); - - unset($table2); - $table2->align = array('left', 'right'); - $table2->width = '100%'; - $table2->data = array(); + /// Add a divider between the categories + if (!$firstflag) { + $table->data[] = 'hr'; + } else { + $firstflag = false; + } + + $table->data[] = array($category->name, '', profile_category_icons($category)); if ($fields = get_records_select('user_info_field', "categoryid=$category->id", 'sortorder ASC')) { foreach ($fields as $field) { - $table2->data[] = array($field->shortname, profile_field_icons($field)); + $table->data[] = array('', $field->name, profile_field_icons($field)); } /// End of $fields foreach } /// End of $fields if - - if (!empty($table2->data)) { - $table->data[] = array('',print_table($table2,true)); - } - } /// End of $categories foreach print_table($table); @@ -269,7 +269,7 @@ if ( ($action == 'editcategory' )) { echo '
'; - echo '
'; + echo '
'; /// Create a new field link $options = profile_list_datatypes(); @@ -279,7 +279,7 @@ if ( ($action == 'editcategory' )) { $options = array('action'=>'editcategory', 'id'=>'0'); print_single_button('index.php',$options,get_string('profilecreatecategory', 'admin')); - echo '
'; + echo ''; } admin_externalpage_print_footer($adminroot); -- 2.39.5