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

bisitz bisitz at source.lon-capa.org
Mon Jan 20 12:25:41 EST 2014


bisitz		Mon Jan 20 17:25:41 2014 EDT

  Modified files:              
    /loncom/interface	lonsupportreq.pm 
  Log:
  - Help students to easily find out which fields are required and which not.
      - Add marker to all required fields and display info text to explain.
    (corresponding to lonevaluate.pm 1.30)
  
  - Warning style for warning message about too big attachment size
  
  - Additional info about rev. 1.76:
  Standard style for note to students
  
  
  
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.77 loncom/interface/lonsupportreq.pm:1.78
--- loncom/interface/lonsupportreq.pm:1.77	Fri Jan 17 17:17:42 2014
+++ loncom/interface/lonsupportreq.pm	Mon Jan 20 17:25:41 2014
@@ -1,5 +1,5 @@
 #
-# $Id: lonsupportreq.pm,v 1.77 2014/01/17 17:17:42 bisitz Exp $
+# $Id: lonsupportreq.pm,v 1.78 2014/01/20 17:25:41 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -294,11 +294,11 @@
     }
     $r->print('<form method="post" action="" name="logproblem"'.$formtype.'>'."\n");
     my $output = &Apache::lonhtmlcommon::start_pick_box().
-#                 &Apache::lonhtmlcommon::row_headline().
-#                 '<span class="LC_info">'.
-#                 &mt('(All fields marked with * are required.)').
-#                 '</span>'.
-#                 &Apache::lonhtmlcommon::row_closure().
+                 &Apache::lonhtmlcommon::row_headline().
+                 '<span class="LC_info">'.
+                 &mt('(All fields marked with * are required.)').
+                 '</span>'.
+                 &Apache::lonhtmlcommon::row_closure().
                  &Apache::lonhtmlcommon::row_title($lt{'name'},undef,$css[$num])."\n";
     my $fullname = '';
     if ((defined($lastname) && $lastname ne '') && (defined($firstname) && $firstname ne '')) {
@@ -316,7 +316,10 @@
                 &Apache::lonhtmlcommon::row_closure()."\n";
     $num ++;
     $i = $num%2;
-    $output .= &Apache::lonhtmlcommon::row_title($lt{'emad'},undef,$css[$i]).
+    $output .= &Apache::lonhtmlcommon::row_title(
+                   '<span title="'.&mt('required').'">'.
+                   $lt{'emad'}.' <span class="LC_info">*</span></span>'
+                  ,undef,$css[$i]).
                '<input type="text" size="20" name="email" value="'.
                &HTML::Entities::encode($email,'"<>&').'" /><br />'."\n".
                &Apache::lonhtmlcommon::row_closure();
@@ -482,11 +485,17 @@
     $output .= &Apache::lonhtmlcommon::row_closure();
     $num ++;
     $i = $num%2; 
-    $output .= &Apache::lonhtmlcommon::row_title($lt{'subj'},undef,'LC_oddrow_value').
-               '  <input type="text" size="40" name="subject" />'."\n".
+    $output .= &Apache::lonhtmlcommon::row_title(
+                   '<span title="'.&mt('required').'">'.
+                   $lt{'subj'}.' <span class="LC_info">*</span></span>'
+                  ,undef,'LC_oddrow_value').
+               '<input type="text" size="40" name="subject" />'."\n".
                &Apache::lonhtmlcommon::row_closure().
-               &Apache::lonhtmlcommon::row_title($lt{'detd'},undef,'LC_evenrow_value').
-               '  <textarea rows="10" cols="45" name="description" style="word-wrap:normal;">'.
+               &Apache::lonhtmlcommon::row_title(
+                   '<span title="'.&mt('required').'">'.
+                   $lt{'detd'}.' <span class="LC_info">*</span></span>'
+                  ,undef,'LC_evenrow_value').
+               '<textarea rows="10" cols="45" name="description" style="word-wrap:normal;">'.
                '</textarea>'."\n".
                &Apache::lonhtmlcommon::row_closure();
     $num ++;
@@ -505,8 +514,11 @@
         my ($captchaform,$error) = 
             &Apache::loncommon::captcha_display('login',$lonhost);
         if ($captchaform) {
-            $output .= &Apache::lonhtmlcommon::row_title(&mt('Validation'),undef,
-                                                         $css[$i])."\n".
+            $output .= &Apache::lonhtmlcommon::row_title(
+                           '<span title="'.&mt('required').'">'.
+                           &mt('Validation').
+                           ' <span class="LC_info">*</span></span>'
+                      ,undef,$css[$i]).
                        $captchaform."\n".
                        &Apache::lonhtmlcommon::row_closure();
             $num ++;
@@ -828,7 +840,8 @@
         if ($homeserver && $env{'form.screenshot.filename'}) {
             $attachmentsize = length($env{'form.screenshot'});
             if ($attachmentsize > 131072) {
-                $displaymsg .= '<br />'.&mt('The uploaded screenshot file ([_1] bytes) included with your request exceeded the maximum allowed size - 128 KB, and has therefore been discarded.',$attachmentsize);
+                $displaymsg .= '<br /><span class="LC_warning">'.
+                               &mt('The uploaded screenshot file ([_1] bytes) included with your request exceeded the maximum allowed size - 128 KB, and has therefore been discarded.',$attachmentsize).'</span>';
             } else {
                 $attachmentpath=&Apache::lonnet::userfileupload('screenshot',undef,'helprequests');
             }




More information about the LON-CAPA-cvs mailing list