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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 01 May 2006 22:15:18 -0000


albertel		Mon May  1 18:15:18 2006 EDT

  Modified files:              
    /loncom/interface	lonpreferences.pm 
  Log:
  - some data table conversion
  - <label>
  
  
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.81 loncom/interface/lonpreferences.pm:1.82
--- loncom/interface/lonpreferences.pm:1.81	Mon May  1 15:37:34 2006
+++ loncom/interface/lonpreferences.pm	Mon May  1 18:15:17 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.81 2006/05/01 19:37:34 albertel Exp $
+# $Id: lonpreferences.pm,v 1.82 2006/05/01 22:15:17 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -306,8 +306,8 @@
 
 <form name="prefs" action="/adm/preferences" method="POST">
 <input type="hidden" name="action" value="verify_and_change_rolespref" />
-<br />Enable Recent Roles Hotlist:
-<input type="checkbox" $checked name="recentroles" value="true" />
+<br /><label>Enable Recent Roles Hotlist:
+<input type="checkbox" $checked name="recentroles" value="true" /></label>
 <br />Number of roles in Hotlist:
 <select name="recentrolesn" size="1">
 $options
@@ -514,19 +514,23 @@
                     'link'  => 'Un-Visited Link',
                     'vlink' => 'Visited Link',
                     'alink' => 'Active Link');
+    my $start_data_table = &Apache::loncommon::start_data_table();
     my $chtable='';
     foreach my $item (sort(keys(%colortypes))) {
        my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain);
-       $chtable.='<tr><td>'.$colortypes{$item}.'</td><td bgcolor="'.$curcol.
+       $chtable.=&Apache::loncommon::start_data_table_row().
+	   '<td>'.$colortypes{$item}.'</td><td bgcolor="'.$curcol.
         '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="'.$item.
         '" size="10" value="'.$curcol.
 '" /></td><td><a href="javascript:pjump('."'color_custom','".$colortypes{$item}.
 "','".$curcol."','"
-	    .$item."','parmform.pres','psub'".');">Select</a></td></tr>';
+	    .$item."','parmform.pres','psub'".');">Select</a></td>'.
+	    &Apache::loncommon::end_data_table_row();
     }
+    my $end_data_table = &Apache::loncommon::end_data_table();
     my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
     $r->print(<<ENDCOL);
-<script>
+<script type="text/javascript">
 
     function pclose() {
         parmwin=window.open("/adm/rat/empty.html","LONCAPAparms",
@@ -559,8 +563,9 @@
 </form>
 <form name="prefs" action="/adm/preferences" method="POST">
 <input type="hidden" name="action" value="verify_and_change_colors" />
-<table border="2">
+$start_data_table
 $chtable
+$end_data_table
 </table>
 <input type="submit" value="Change Custom Colors" />
 <input type="submit" name="resetall" value="Reset All Colors to Default" />
@@ -873,34 +878,32 @@
 $lt{'sdpf'}<br/> $lt{'prca'}  <ol><li>$lt{'whpo'}</li><li>$lt{'unwh'}</li></ol> 
 <br />
 <br />
-<table border="0" cellpadding="0" cellspacing="0">
- <tr>
-  <td width="100%" bgcolor="#000000">
-   <table width="100%" border="0" cellpadding="1" cellspacing="0">
-    <tr>
-     <td width="100%" bgcolor="#000000">
-      <table border="0" cellpadding="3" cellspacing="3" bgcolor="#FFFFFF">
-       <tr bgcolor="$color">
-        <td><b>$lt{'pref'}</b></td>
-        <td><b>$lt{'curr'}</b></td>
-        <td><b>$lt{'actn'}?</b></td>
+END
+    $r->print(&Apache::loncommon::start_data_table());
+    $r->print(<<"END");
+       <tr>
+        <th>$lt{'pref'}</th>
+        <th>$lt{'curr'}</th>
+        <th>$lt{'actn'}?</th>
        </tr>
-       <tr bgcolor="#dddddd">
+END
+    $r->print(&Apache::loncommon::start_data_table_row());
+    $r->print(<<"END");
        <td>$lt{'disa'}</td>
        <td>$lt{$discdisp}</td>
-       <td><input type="checkbox" name="discdisp" /><input type="hidden" name="newdisp" value="$newdisp" />&nbsp;$lt{'chgt'} "$dispchange"</td>
-      </tr><tr bgcolor="#eeeeee">
+       <td><label><input type="checkbox" name="discdisp" /><input type="hidden" name="newdisp" value="$newdisp" />&nbsp;$lt{'chgt'} "$dispchange"</label></td>
+END
+    $r->print(&Apache::loncommon::end_data_table_row().
+	      &Apache::loncommon::start_data_table_row());
+    $r->print(<<"END");
        <td>$lt{'npmr'}</td>
        <td>$lt{$discmark}</td>
-       <td><input type="checkbox" name="discmark" /><input type="hidden" name="newmark" value="$newmark" />&nbsp;$lt{'chgt'} "$markchange"</td>
+       <td><label><input type="checkbox" name="discmark" /><input type="hidden" name="newmark" value="$newmark" />&nbsp;$lt{'chgt'} "$markchange"</label></td>
       </tr>
-     </table>
-    </td>
-   </tr>
-  </table>
- </td>
-</tr>
-</table>
+END
+    $r->print(&Apache::loncommon::end_data_table_row().
+	      &Apache::loncommon::end_data_table());
+    $r->print(<<"END");
 <br />
 <br />
 <input type="submit" name="sub" value="Store Changes" />