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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 17 Feb 2005 04:11:21 -0000


This is a MIME encoded message

--albertel1108613481
Content-Type: text/plain

albertel		Wed Feb 16 23:11:21 2005 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm lonmsg.pm 
  Log:
  - xhtml cleanups
  - stuck in a bunch of <label>s
  
  
--albertel1108613481
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20050216231121.txt"

Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.150 loncom/interface/lonfeedback.pm:1.151
--- loncom/interface/lonfeedback.pm:1.150	Wed Feb 16 22:42:29 2005
+++ loncom/interface/lonfeedback.pm	Wed Feb 16 23:11:20 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.150 2005/02/17 03:42:29 albertel Exp $
+# $Id: lonfeedback.pm,v 1.151 2005/02/17 04:11:20 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -974,9 +974,9 @@
                             $contrib{$idx.':sendername'},$contrib{$idx.':senderdomain'},$ressymb);
 		        }
                         if ($$dischash{$readkey}=~/\.$idx\./) { 
-                            $ctlink = '<b>'.&mt('Mark unread').'?</b>&nbsp;<input type="checkbox" name="postunread_'.$idx.'" />';
+                            $ctlink = '<label><b>'.&mt('Mark unread').'?</b>&nbsp;<input type="checkbox" name="postunread_'.$idx.'" /></label>';
                         } else {
-                            $ctlink = '<b>'.&mt('Mark read').'?</b>&nbsp;<input type="checkbox" name="postread_'.$idx.'" />';
+                            $ctlink = '<label><b>'.&mt('Mark read').'?</b>&nbsp;<input type="checkbox" name="postread_'.$idx.'" /></label>';
                         }
                     }
 #figure out at what position this needs to print
@@ -1753,18 +1753,18 @@
        <tr bgcolor="#dddddd">
        <td>$lt{'disa'}</td>
        <td>$lt{$discdisp}</td>
-       <td><input type="checkbox" name="discdisp" onClick="discdispChk('0')" />&nbsp;$lt{'chgt'} "$dispchangeA"
+       <td><label><input type="checkbox" name="discdisp" onClick="discdispChk('0')" />&nbsp;$lt{'chgt'} "$dispchangeA"</label>
            <br />
-           <input type="checkbox" name="discdisp" onClick="discdispChk('1')" />&nbsp;$lt{'chgt'} "$dispchangeB"
+           <label><input type="checkbox" name="discdisp" onClick="discdispChk('1')" />&nbsp;$lt{'chgt'} "$dispchangeB"</label>
        </td>
       </tr><tr bgcolor="#eeeeee">
        <td>$lt{'npmr'}</td>
        <td>$lt{$discmark}</td>
-       <td><input type="checkbox" name="discmark" />$lt{'chgt'} "$markchange"</td>
+       <td><label><input type="checkbox" name="discmark" />$lt{'chgt'} "$markchange"</label></td>
       </tr><tr bgcolor="#dddddd">
        <td>$lt{'dotm'}</td>
        <td>$lt{$disctogg}</td>
-       <td><input type="checkbox" name="disctogg" onClick="discdispChk('2')" />$lt{'chgt'} "$toggchange"</td>
+       <td><label><input type="checkbox" name="disctogg" onClick="discdispChk('2')" />$lt{'chgt'} "$toggchange"</label></td>
       </tr>
      </table>
     </td>
@@ -1929,7 +1929,7 @@
    </select>
   </td>
   <td>&nbsp;</td>
-  <td><input type="checkbox" name="posterlist" value="$symb" />$lt{'shal'}</td>
+  <td><label><input type="checkbox" name="posterlist" value="$symb" />$lt{'shal'}</label></td>
  </tr>
 </table>
 <br />
@@ -2024,7 +2024,7 @@
                     next;
                 } else {
                     $count ++;
-                    $r->print('<tr bgcolor="#ffffe6"><td align="right">'.$count.'</td><td align="center"><input name="stuinfo" type="checkbox" value="'.$_.'" /></td><td>'.$last.', '.$first.' ('.$uname.','.$udom.')</td><td>'.$postcounts{$_}.'</td></tr>');
+                    $r->print('<tr bgcolor="#ffffe6"><td align="right">'.$count.'</td><td align="center"><label><input name="stuinfo" type="checkbox" value="'.$_.'" /></td><td>'.$last.', '.$first.' ('.$uname.','.$udom.')</label></td><td>'.$postcounts{$_}.'</td></tr>');
                 }
             }
         }
@@ -2255,23 +2255,25 @@
     unless (($ENV{'form.replydisc'}) || ($ENV{'form.editdisc'})) {
 	if (($feedurl=~/^\/res\//) && ($feedurl!~/^\/res\/adm/)) {
 	    $msgoptions= 
-		'<p><input type="checkbox" name="author" /> '.
-		&mt('Feedback to resource author').'</p>';
+		'<p><label><input type="checkbox" name="author" /> '.
+		&mt('Feedback to resource author').'</label></p>';
 	}
 	if (&feedback_available(1)) {
 	    $msgoptions.=
-		'<br /><input type="checkbox" name="question" /> '.
-		&mt('Question about resource content');
+		'<p><label><input type="checkbox" name="question" /> '.
+		&mt('Question about resource content').'</label></p>';
 	}
 	if (&feedback_available(0,1)) {
 	    $msgoptions.=
-		'<br /><input type="checkbox" name="course" /> '.
-		&mt('Question/Comment/Feedback about course content');
+		'<p><label><input type="checkbox" name="course" /> '.
+		&mt('Question/Comment/Feedback about course content').
+		'</label></p>';
 	}
 	if (&feedback_available(0,0,1)) {
 	    $msgoptions.=
-		'<br /><input type="checkbox" name="policy" /> '.
-		&mt('Question/Comment/Feedback about course policy');
+		'<p><label><input type="checkbox" name="policy" /> '.
+		&mt('Question/Comment/Feedback about course policy').
+		'</label></p>';
 	}
     }
     if ($ENV{'request.course.id'}) {
@@ -2279,12 +2281,12 @@
 	    &Apache::lonnet::allowed('pch',
 				     $ENV{'request.course.id'}.
 				     ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
-	    $discussoptions='<input type="checkbox" name="discuss" onClick="this.form.anondiscuss.checked=false;" '.
+	    $discussoptions='<label><input type="checkbox" name="discuss" onClick="this.form.anondiscuss.checked=false;" '.
 		($ENV{'form.replydisc'}?' checked="1"':'').' /> '.
 		&mt('Contribution to course discussion of resource');
-	    $discussoptions.='<br /><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;" /> '.
+	    $discussoptions.='</label><br /><label><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;" /> '.
 		&mt('Anonymous contribution to course discussion of resource').
-		' <i>('.&mt('name only visible to course faculty').')</i>';
+		' <i>('.&mt('name only visible to course faculty').')</i></label>';
         }
     }
     if ($msgoptions) { $msgoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/feedback.gif').'" />'.&mt('Sending Messages').'</h2>'.$msgoptions; }
@@ -2630,7 +2632,7 @@
                 foreach my $id (@currold) {
                     my $attachurl = &HTML::Entities::decode($attachments{$id}{'filename'}); 
                     $attachurl =~ m#/([^/]+)$#;
-                    $r->print('<input type="checkbox" name="deloldattach" value="'.$id.'" />&nbsp;'.$1.'<br />'."\n");
+                    $r->print('<label><input type="checkbox" name="deloldattach" value="'.$id.'" />&nbsp;'.$1.'</label><br />'."\n");
                 }
                 $r->print("<br />");
             }
@@ -2640,7 +2642,7 @@
         $r->print("The following attachments have been uploaded for inclusion with this posting.<br />Check the checkboxes for any you wish to remove<br />\n");
         foreach (@{$currnewattach}) {
             $_ =~ m#/([^/]+)$#;
-            $r->print('<input type="checkbox" name="delnewattach" value="'.$_.'" />&nbsp;'.$1.'<br />'."\n");
+            $r->print('<label><input type="checkbox" name="delnewattach" value="'.$_.'" />&nbsp;'.$1.'</label><br />'."\n");
         }
         $r->print("<br />"); 
     }
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.135 loncom/interface/lonmsg.pm:1.136
--- loncom/interface/lonmsg.pm:1.135	Wed Feb 16 23:02:47 2005
+++ loncom/interface/lonmsg.pm	Wed Feb 16 23:11:21 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.135 2005/02/17 04:02:47 albertel Exp $
+# $Id: lonmsg.pm,v 1.136 2005/02/17 04:11:21 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -675,7 +675,7 @@
 </script>
 <input type="button" onClick="checkall()" value="$lt{'cfa'}" />&nbsp;
 <input type="button" onClick="checksec()" value="$lt{'cfs'}" />
-<input type="text" size="5" name=chksec />&nbsp;
+<input type="text" size="5" name="chksec" />&nbsp;
 <input type="button" onClick="uncheckall()" value="$lt{'cfn'}" />
 <p>
 ENDDISHEADER
@@ -712,8 +712,8 @@
         my $key = 'send_to_&&&'.$section.'&&&_'.$student;
         if (! defined($fullname) || $fullname eq '') { $fullname = $sname; }
         $r->print('<tr><td><label>'.
-                  qq{<input type="checkbox" name="$key">}.('&nbsp;'x2).
-                  $fullname.'</td><td>'.$sname.'@'.$sdom.'</td><td>'.$section.
+                  qq{<input type="checkbox" name="$key" />}.('&nbsp;'x2).
+                  $fullname.'</label></td><td>'.$sname.'@'.$sdom.'</td><td>'.$section.
                   '</td></tr>');
     }
     $r->print('</table>');
@@ -724,8 +724,8 @@
 sub discrit {
     my $r=shift;
     my $header = '<h1><font color=red>'.&mt('Critical Messages').'</font></h1>'.
-        '<form action=/adm/email method=post>'.
-        '<input type=hidden name=confirm value=true>';
+        '<form action="/adm/email" method="POST">'.
+        '<input type="hidden" name="confirm" value="true" />';
     my %what=&Apache::lonnet::dump('critical');
     my $result = '';
     foreach (sort keys %what) {
@@ -742,9 +742,9 @@
             '</pre><small>'.
 &mt('You have to confirm that you received this message. After confirmation, this message will be moved to your regular inbox').
             '</small><br />'.
-            '<input type=submit name="rec_'.$_.'" value="'.&mt('Confirm Receipt').'">'.
-            '<input type=submit name="reprec_'.$_.'" '.
-                  'value="'.&mt('Confirm Receipt and Reply').'">';
+            '<input type="submit" name="rec_'.$_.'" value="'.&mt('Confirm Receipt').'" />'.
+            '<input type="submit" name="reprec_'.$_.'" '.
+                  'value="'.&mt('Confirm Receipt and Reply').'" />';
     }
     # Check to see if there were any messages.
     if ($result eq '') {
@@ -1004,7 +1004,7 @@
 	    } else {
 		$r->print('<tr bgcolor="#99BBBB">');
 	    }
-	    $r->print('<td><input type=checkbox name="delmark_'.$origID.'" /></td><td><a href="/adm/email?display='.$origID.$sqs. 
+	    $r->print('<td><input type="checkbox" name="delmark_'.$origID.'" /></td><td><a href="/adm/email?display='.$origID.$sqs. 
 		      '">'.&mt('Open').'</a></td><td>'.
 		      ($folder ne 'trash'?'<a href="/adm/email?markdel='.$origID.$sqs.
 		      '">'.&mt('Delete'):'&nbsp').'</a></td>'.
@@ -1090,12 +1090,12 @@
     if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {
 	 my $crithelp = Apache::loncommon::help_open_topic("Course_Critical_Message");
          $dispcrit=
- '<input type="checkbox" name="critmsg" /> '.&mt('Send as critical message').' ' . $crithelp . 
- '<br />'.
- '<input type="checkbox" name="sendbck" /> '.&mt('Send as critical message').'  ' .
- &mt('and return receipt') . $crithelp . 
- '<br /><input type="checkbox" name="permanent" /> '.
-&mt('Send copy to permanent email address (if known)').'<p>';
+ '<p><label><input type="checkbox" name="critmsg" /> '.&mt('Send as critical message').'</label> ' . $crithelp . 
+ '</p><p>'.
+ '<label><input type="checkbox" name="sendbck" /> '.&mt('Send as critical message').'  ' .
+ &mt('and return receipt') . '</label>' . $crithelp . 
+ '</p><p><label><input type="checkbox" name="permanent" /> '.
+&mt('Send copy to permanent email address (if known)').'</label></p>';
      }
     my %message;
     my %content;
@@ -1129,8 +1129,8 @@
 	if ($content{'baseurl'}) {
 	    $disbase='<input type="hidden" name="baseurl" value="'.&Apache::lonnet::escape($content{'baseurl'}).'" />';
 	    if ($ENV{'user.adv'}) {
-		$disbase.='<input type="checkbox" name="storebasecomment" />'.&mt('Store message for re-use').
-		    ' <a href="/adm/email?showcommentbaseurl='.
+		$disbase.='<label><input type="checkbox" name="storebasecomment" />'.&mt('Store message for re-use').
+		    '</label> <a href="/adm/email?showcommentbaseurl='.
 		    &Apache::lonnet::escape($content{'baseurl'}).'" target="comments">'.
 		    &mt('Show re-usable messages').'</a><br />';
 	    }
@@ -1158,7 +1158,7 @@
 	    my $selectlink=&Apache::loncommon::selectstudent_link
 	    ('compemail','recuname','recdomain');
 	    $r->print(<<"ENDREC");
-<tr><td>$lt{'us'}:</td><td><input type="text" size="12" name="recuname" value="$ENV{'form.recname'}"></td><td rowspan="2">$selectlink</td></tr>
+<tr><td>$lt{'us'}:</td><td><input type="text" size="12" name="recuname" value="$ENV{'form.recname'}" /></td><td rowspan="2">$selectlink</td></tr>
 <tr><td>$lt{'do'}:</td>
 <td>$domform</td></tr>
 ENDREC
@@ -1559,8 +1559,8 @@
        <tr bgcolor="$bgcols[$iter]">
         <td>$$ltext{'star'}:&nbsp;$startform<br/>$$ltext{'endd'}:&nbsp;&nbsp;$endform</td>
         <td>$settername</td>
-        <td><input type="text" name="title_$parmcount" size="15" value="$title"/><input type="hidden" name="key_$parmcount" value="$_"></td>
-        <td>$lt{'modi'}?&nbsp;<input type="checkbox" name="modify_$parmcount"/><br />$lt{'canc'}?&nbsp;&nbsp;<input type="checkbox" name="cancel_$parmcount"/>
+        <td><input type="text" name="title_$parmcount" size="15" value="$title" /><input type="hidden" name="key_$parmcount" value="$_" /></td>
+        <td><label>$lt{'modi'}?&nbsp;<input type="checkbox" name="modify_$parmcount" /></label><br /><label>$lt{'canc'}?&nbsp;&nbsp;<input type="checkbox" name="cancel_$parmcount" /></label>
        </tr>
 END
         $parmcount ++;
@@ -1612,8 +1612,8 @@
        </tr>
        <tr bgcolor="#eeeeee">
         <td>$$ltext{'star'}:&nbsp;$startform<br />$$ltext{'endd'}:&nbsp;&nbsp;$endform</td>
-        <td><input type="text" name="title_$parmcount" size="15" value=""/></td>
-        <td>$lt{'addb'}?&nbsp;<input type="checkbox" name="add_$parmcount" value="1"/></td>
+        <td><input type="text" name="title_$parmcount" size="15" value="" /></td>
+        <td><label>$lt{'addb'}?&nbsp;<input type="checkbox" name="add_$parmcount" value="1" /></label></td>
        </tr>
       </table>
      </td>

--albertel1108613481--