[LON-CAPA-cvs] cvs: loncom /interface lonuserutils.pm

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Fri, 26 Sep 2008 08:38:14 -0000


bisitz		Fri Sep 26 04:38:14 2008 EDT

  Modified files:              
    /loncom/interface	lonuserutils.pm 
  Log:
  - Keep each selection list and corresponding text together
  - XHTML conform "checked" usage
  
  
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.69 loncom/interface/lonuserutils.pm:1.70
--- loncom/interface/lonuserutils.pm:1.69	Fri Sep 12 10:35:46 2008
+++ loncom/interface/lonuserutils.pm	Fri Sep 26 04:38:11 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility functions for managing LON-CAPA user accounts
 #
-# $Id: lonuserutils.pm,v 1.69 2008/09/12 14:35:46 bisitz Exp $
+# $Id: lonuserutils.pm,v 1.70 2008/09/26 08:38:11 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1009,7 +1009,7 @@
     }
     my $perpetual = '<span class="LC_nobreak"><label><input type="checkbox" name="no_end_date"';
     if (defined($endtime) && $endtime == 0) {
-        $perpetual .= ' checked';
+        $perpetual .= ' checked="checked"';
     }
     $perpetual.= ' /> '.&mt('no ending date').'</label></span>';
     if ($mode eq 'create_enrolldates') {
@@ -1295,9 +1295,13 @@
             $output_selector .= "\n".$option;
         }
         $output_selector .= '</select>';
-        $r->print('<label>'.&mt('Output Format: [_1]',$output_selector).'</label>'.('&nbsp;'x3));
-    }
-    $r->print('<label>'.&mt('User Status: [_1]',$status_select).'</label>'.('&nbsp;'x3)."\n");
+        $r->print('<label><span class="LC_nobreak">'
+                 .&mt('Output Format: [_1]',$output_selector)
+                 .'</span></label>'.('&nbsp;'x3));
+    }
+    $r->print('<label><span class="LC_nobreak">'
+             .&mt('User Status: [_1]',$status_select)
+             .'</span></label>'.('&nbsp;'x3)."\n");
     my $roleselected = '';
     if ($env{'form.showrole'} eq 'Any') {
        $roleselected = ' selected="selected" '; 
@@ -1490,7 +1494,9 @@
     my ($role_select);
     if ($context eq 'domain') {
         $role_select = &domain_roles_select();
-        $output = '<label>'.&mt('Role Type: [_1]',$role_select).'</label>';
+        $output = '<label><span class="LC_nobreak">'
+                 .&mt('Role Type: [_1]',$role_select)
+                 .'</span></label>';
     } else {
         $role_select = '<select name="showrole">'."\n".
                        '<option value="Any" '.$roleselected.'>'.
@@ -1510,7 +1516,9 @@
             $role_select .= '<option value="'.$role.'"'.$roleselected.'>'.$plrole.'</option>';
         }
         $role_select .= '</select>';
-        $output = '<label>'.&mt('Role: [_1]',$role_select).'</label>';
+        $output = '<label><span class="LC_nobreak">'
+                 .&mt('Role: [_1]',$role_select)
+                 .'</span></label>';
     }
     return $output;
 }