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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 22 Jun 2006 15:56:04 -0000


albertel		Thu Jun 22 11:56:04 2006 EDT

  Modified files:              
    /loncom/interface	portfolio.pm 
  Log:
  - <nobr> -> <span>
  - add in missing </select>
  - POST ->post
  - valid html page now
  
  
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.111 loncom/interface/portfolio.pm:1.112
--- loncom/interface/portfolio.pm:1.111	Thu Jun 22 11:46:28 2006
+++ loncom/interface/portfolio.pm	Thu Jun 22 11:56:03 2006
@@ -261,10 +261,10 @@
 			    $filename.'</a></td>'); 
                 $r->print('<td>'.$size.'</td>');
                 $r->print('<td>'.&Apache::lonlocal::locallocaltime($mtime).'</td>');
-                $r->print('<td><nobr>'.&mt($curr_access).'&nbsp;&nbsp;&nbsp;'.
+                $r->print('<td><span style="white-space: nowrap">'.&mt($curr_access).'&nbsp;&nbsp;&nbsp;'.
                           '<a href="'.$url.'?access='.$filename.
                           '&amp;currentpath='.$current_path.$groupecho.
-                          '">'.&mt('View/Change').'</a></nobr></td>');
+                          '">'.&mt('View/Change').'</a></span></td>');
                 $r->print('</tr>'); 
             }
         }
@@ -316,7 +316,7 @@
               $group.'" />');
     }
     $r->print('</p></form>');
-    $r->print('<form action="'.$url.'" method="POST">
+    $r->print('<form action="'.$url.'" method="post">
                <p>
               <input type="hidden" name="currentpath" value="'.
 	      $env{'form.currentpath'}.'" />');
@@ -1047,7 +1047,7 @@
             }
             $max_id ++;
             my $role_selects = &role_selectors($num,$role_id,$status,$type,\%content,'display');
-            $r->print('<tr><td><nobr><label><input type="checkbox" name="delete_role_'.$num.'" value="'.$role_id.'" />'.&mt('Delete').'</label></nobr><br /><input type="hidden" name="preserve_role_'.$num.'" value="'.$role_id.'" /></td>'.$role_selects.'</tr>');
+            $r->print('<tr><td><span style="white-space: nowrap"><label><input type="checkbox" name="delete_role_'.$num.'" value="'.$role_id.'" />'.&mt('Delete').'</label></span><br /><input type="hidden" name="preserve_role_'.$num.'" value="'.$role_id.'" /></td>'.$role_selects.'</tr>');
         }
         $r->print('</table><br />'.&mt('Add a roles-based condition').'&nbsp;<input type="checkbox" name ="add_role_'.$num.'" onClick="javascript:setRoleOptions(this,'."'$num','$content{domain}','$content{number}','Course'".')" value="'.$max_id.'" /><input type="hidden" name="role_'.$num.'_'.$max_id.'" /><input type="hidden" name="access_'.$num.'_'.$max_id.'" /><input type="hidden" name="section_'.$num.'_'.$max_id.'" /><input type="hidden" name="group_'.$num.'_'.$max_id.'" /></td>');
     } elsif ($status eq 'new') {
@@ -1063,7 +1063,7 @@
     my ($r,$status,$item,$all_doms,$access_controls,$now,$then) = @_;
     my ($num,$scope,$end,$start) = &set_identifiers($status,$item,$now,$then,
                                                     'domains');
-    my $dom_select = '<select name="dom_'.$num.'" size="4" multiple="true"/>'.
+    my $dom_select = '<select name="dom_'.$num.'" size="4" multiple="true">'.
                      ' <option value="">'.&mt('Please select').'</option>';
     if ($status eq 'old') {
         my $content =  $$access_controls{$item};
@@ -1081,6 +1081,7 @@
             $dom_select .= '<option value="'.$dom.'">'.$dom.'</option>';
         }
     }
+    $dom_select .= '</select>';
     $r->print('<td>'.&actionbox($status,$num,$scope).'</td><td>'.$dom_select.
               '</td><td>'.&dateboxes($num,$start,$end).'</td>');
 }
@@ -1105,17 +1106,17 @@
 
 sub actionbox {
     my ($status,$num,$scope) = @_;
-    my $output = '<nobr><label>';
+    my $output = '<span style="white-space: nowrap"><label>';
     if ($status eq 'new') {
         $output .= '<input type="checkbox" name="activate" value="'.$num.'" />'.
         &mt('Activate');
     } else {
         $output .= '<input type="checkbox" name="delete" value="'.$num.
-                   '" />'.&mt('Delete').'</label><br /><nobr>'.
+                   '" />'.&mt('Delete').'</label></span><br /><span style="white-space: nowrap">'.
                    '<label><input type="checkbox" name="update" value="'.
                    $num.'" />'.&mt('Update');
     }
-    $output .= '</label></nobr><input type="hidden" name="scope_'.$num.                '" value="'.$scope.'" />';
+    $output .= '</label></span><input type="hidden" name="scope_'.$num.                '" value="'.$scope.'" />';
     return $output;
 }
                                                                                    
@@ -1130,10 +1131,10 @@
                             undef,undef,1);
     my $enddate = &Apache::lonhtmlcommon::date_setter('portform',
                                'enddate_'.$num,$end,undef,undef,undef,1,undef,
-                                undef,undef,1). '&nbsp;&nbsp;<nobr><label>'.
+                                undef,undef,1). '&nbsp;&nbsp;<span style="white-space: nowrap"><label>'.
                                 '<input type="checkbox" name="noend_'.
                                 $num.'" '.$noend.' />'.&mt('No end date').
-                                '</label></nobr>';
+                                '</label></span>';
                                                                                    
     my $output = &mt('Start: ').$startdate.'<br />'.&mt('End: ').$enddate;
     return $output;