Diff for /loncom/interface/lonsupportreq.pm between versions 1.49 and 1.53

version 1.49, 2008/07/08 01:08:57 version 1.53, 2009/06/05 12:49:50
Line 238  function initialize_codes() { Line 238  function initialize_codes() {
     if ($r->uri eq '/adm/helpdesk') {      if ($r->uri eq '/adm/helpdesk') {
         &print_header($r,$origurl);          &print_header($r,$origurl);
     }      }
       my @css = ('LC_evenrow_value','LC_oddrow_value');
       my $num = 1;
       my $i = $num%2;
     $r->print('<form method="post" name="logproblem" enctype="multipart/form-data">'."\n");      $r->print('<form method="post" name="logproblem" enctype="multipart/form-data">'."\n");
     my $output = &Apache::lonhtmlcommon::start_pick_box().      my $output = &Apache::lonhtmlcommon::start_pick_box().
                  &Apache::lonhtmlcommon::row_title($lt{'name'},undef,'LC_oddrow_value')."\n";                   &Apache::lonhtmlcommon::row_title($lt{'name'},undef,$css[$num])."\n";
     my $fullname = '';      my $fullname = '';
     if ((defined($lastname) && $lastname ne '') && (defined($firstname) && $firstname ne '')) {      if ((defined($lastname) && $lastname ne '') && (defined($firstname) && $firstname ne '')) {
         $fullname = "$firstname $lastname";           $fullname = "$firstname $lastname"; 
Line 254  function initialize_codes() { Line 257  function initialize_codes() {
         $output .= '<input type="text" size="20" name="username" value="'.&HTML::Entities::encode($fullname,'"<>&').'" />';          $output .= '<input type="text" size="20" name="username" value="'.&HTML::Entities::encode($fullname,'"<>&').'" />';
     }      }
     $output .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="'.$lt{'subm'}.'" onclick="validate()" />&nbsp;'.      $output .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="'.$lt{'subm'}.'" onclick="validate()" />&nbsp;'.
                 &Apache::lonhtmlcommon::row_closure()."\n".                  &Apache::lonhtmlcommon::row_closure()."\n";
                 &Apache::lonhtmlcommon::row_title($lt{'emad'},undef,'LC_evenrow_value').      $num ++;
                 '<input type="text" size="20" name="email" value="'.      $i = $num%2;
                 &HTML::Entities::encode($email,'"<>&').'" /><br />'."\n".      $output .= &Apache::lonhtmlcommon::row_title($lt{'emad'},undef,$css[$i]).
                 &Apache::lonhtmlcommon::row_closure().                 '<input type="text" size="20" name="email" value="'.
                 &Apache::lonhtmlcommon::row_title($lt{'emac'},undef,'LC_oddrow_value').                 &HTML::Entities::encode($email,'"<>&').'" /><br />'."\n".
                 '<input type="text" size="50" name="cc" value="" /><br />'."\n".                 &Apache::lonhtmlcommon::row_closure();
                 &Apache::lonhtmlcommon::row_closure().      $num ++;
                 &Apache::lonhtmlcommon::row_title("$lt{'unme'}/$lt{'doma'}",undef,'LC_evenrow_value');      $i = $num%2;
       if (defined($env{'user.name'})) {
           $output .= &Apache::lonhtmlcommon::row_title($lt{'emac'},undef,$css[$i]).
                      '<input type="text" size="50" name="cc" value="" /><br />'."\n".
                      &Apache::lonhtmlcommon::row_closure();
           $num ++;
           $i = $num%2;
       }
       $output .= &Apache::lonhtmlcommon::row_title("$lt{'unme'}/$lt{'doma'}",undef,$css[$i]);
     my $udom_input = '<input type="hidden" name="udom" value="'.      my $udom_input = '<input type="hidden" name="udom" value="'.
                      &HTML::Entities::encode($udom,'"<>&').'" />';                       &HTML::Entities::encode($udom,'"<>&').'" />';
     my $uname_input = '<input type="hidden" name="uname" value="'.      my $uname_input = '<input type="hidden" name="uname" value="'.
Line 294  function initialize_codes() { Line 305  function initialize_codes() {
         }          }
         $output .= $unameform.$udomform;          $output .= $unameform.$udomform;
     }      }
     $output .= &Apache::lonhtmlcommon::row_closure().      $output .= &Apache::lonhtmlcommon::row_closure();
                &Apache::lonhtmlcommon::row_title("$lt{'urlp'}",undef,'LC_oddrow_value').      $num ++;
       $i = $num%2;
       $output .= &Apache::lonhtmlcommon::row_title("$lt{'urlp'}",undef,$css[$i]).
                $showserver.'<input type="hidden" name="sourceurl" value="'.                 $showserver.'<input type="hidden" name="sourceurl" value="'.
                &HTML::Entities::encode($server,'"<>&').'" />'.                 &HTML::Entities::encode($server,'"<>&').'" />'.
                &Apache::lonhtmlcommon::row_closure().                 &Apache::lonhtmlcommon::row_closure().
                &Apache::lonhtmlcommon::row_title("$lt{'phon'}",undef,'LC_evenrow_value').                 &Apache::lonhtmlcommon::row_title("$lt{'phon'}",undef,'LC_evenrow_value').
                '<input type="text" size="15" name="phone" /><br />'.                 '<input type="text" size="15" name="phone" /><br />'.
                &Apache::lonhtmlcommon::row_closure().                 &Apache::lonhtmlcommon::row_closure();
                &Apache::lonhtmlcommon::row_title("$lt{'crsd'}$details_title",undef,'LC_oddrow_value');      $num ++;
       $i = $num%2; 
       $output .= &Apache::lonhtmlcommon::row_title("$lt{'crsd'}$details_title",undef,$css[$i]);
     if ($cnum) {      if ($cnum) {
         if ($coursecodes{$cnum}) {          if ($coursecodes{$cnum}) {
             foreach my $item (@codetitles) {              foreach my $item (@codetitles) {
Line 380  function initialize_codes() { Line 395  function initialize_codes() {
         $output .= '<br />'.$lt{'enct'}.':&nbsp;          $output .= '<br />'.$lt{'enct'}.':&nbsp;
                  <input type="text" name="title" size="25" value="" />'."\n";                   <input type="text" name="title" size="25" value="" />'."\n";
     }      }
     $output .= &Apache::lonhtmlcommon::row_closure().      $output .= &Apache::lonhtmlcommon::row_closure();
                &Apache::lonhtmlcommon::row_title($lt{'secn'},undef,'LC_evenrow_value');      $num ++;
       $i = $num%2;
       $output .= &Apache::lonhtmlcommon::row_title($lt{'secn'},undef,$css[$i]);
     if ($sectionlist) {      if ($sectionlist) {
         $output .= "<select name=\"section\"\n>".          $output .= "<select name=\"section\"\n>".
                    "  <option value=\"\" selected=\"selected\">$lt{'sele'}</option>\n";                     "  <option value=\"\" selected=\"selected\">$lt{'sele'}</option>\n";
Line 400  function initialize_codes() { Line 417  function initialize_codes() {
     } else {      } else {
         $output .= '<input type="text" name="section" size="10" />';          $output .= '<input type="text" name="section" size="10" />';
     }      }
     $output .= &Apache::lonhtmlcommon::row_closure().      $output .= &Apache::lonhtmlcommon::row_closure();
                &Apache::lonhtmlcommon::row_title($lt{'subj'},undef,'LC_oddrow_value').      $num ++;
       $i = $num%2; 
       $output .= &Apache::lonhtmlcommon::row_title($lt{'subj'},undef,'LC_oddrow_value').
                '  <input type="text" size="40" name="subject" />'."\n".                 '  <input type="text" size="40" name="subject" />'."\n".
                &Apache::lonhtmlcommon::row_closure().                 &Apache::lonhtmlcommon::row_closure().
                &Apache::lonhtmlcommon::row_title($lt{'detd'},undef,'LC_evenrow_value').                 &Apache::lonhtmlcommon::row_title($lt{'detd'},undef,'LC_evenrow_value').
                '  <textarea rows="10" cols="45" name="description" wrap="virtual"></textarea>'.                 '  <textarea rows="10" cols="45" name="description" wrap="virtual"></textarea>'.
                &Apache::lonhtmlcommon::row_closure();                 &Apache::lonhtmlcommon::row_closure();
     my $lastrow = 'LC_evenrow_value';      $num ++;
       $i = $num%2; 
     if (defined($env{'user.name'})) {      if (defined($env{'user.name'})) {
         $output .= &Apache::lonhtmlcommon::row_title($lt{'opfi'},undef,'LC_oddrow_value').          $output .= &Apache::lonhtmlcommon::row_title($lt{'opfi'},undef,$css[$i]).
                    ' <input type="file" name="screenshot" size="20" /><br />'.$lt{'uplf'}."\n".                     ' <input type="file" name="screenshot" size="20" /><br />'.$lt{'uplf'}."\n".
         &Apache::lonhtmlcommon::row_closure();          &Apache::lonhtmlcommon::row_closure();
         $lastrow = 'LC_oddrow_value';          $num ++;
           $i = $num%2; 
     }      }
     $output .= &Apache::lonhtmlcommon::row_title($lt{'fini'},undef,$lastrow);      $output .= &Apache::lonhtmlcommon::row_title($lt{'fini'},undef,$css[$i]);
     $output .= <<END;      $output .= <<END;
              <table border="0" cellpadding="8" cellspacing="0">               <table border="0" cellpadding="8" cellspacing="0">
               <tr>                <tr>
Line 474  sub print_request_receipt { Line 495  sub print_request_receipt {
     }      }
     my %lt = &Apache::lonlocal::texthash (      my %lt = &Apache::lonlocal::texthash (
                  username    => 'Name',                   username    => 'Name',
                  email       => 'Email',                   email       => 'E-mail',
                  cc          => 'Cc',                   cc          => 'Cc',
                  user        => 'Username/domain',                   user        => 'Username/domain',
                  phone       => 'Phone',                   phone       => 'Phone',
Line 493  sub print_request_receipt { Line 514  sub print_request_receipt {
     );      );
   
     my (@ok_ccs,@bad_ccs,$badccmsg,$okcclist);      my (@ok_ccs,@bad_ccs,$badccmsg,$okcclist);
     if (defined($env{'form.cc'})) {      if ((defined($env{'user.name'})) && (defined($env{'form.cc'}))) {
         my @ccs;          my @ccs;
         if ($env{'form.cc'} =~ /,/) {          if ($env{'form.cc'} =~ /,/) {
             @ccs = split(/,/,$env{'form.cc'});              @ccs = split(/,/,$env{'form.cc'});
Line 663  END Line 684  END
   
     if ($attachmentpath =~ m-/([^/]+)$-) {      if ($attachmentpath =~ m-/([^/]+)$-) {
         $fname = $1;          $fname = $1;
         $displaymsg .= '<br />'.&mt('An uploaded screenshot file \'[_1]\' ([_2] bytes) was included in the request sent by [_3].',$fname,$attachmentsize,$env{'user.name'}.': '.$env{'user.domain'});          $displaymsg .= '<br />'
                         .&mt('An uploaded screenshot file [_1] ([_2] bytes) was included in the request sent by [_3].'
                             ,'<span class="LC_filename">'.$fname.'<span>'
                             ,$attachmentsize
                             ,$env{'user.name'}.':'.$env{'user.domain'}
                          );
         $supportmsg .= "\n";          $supportmsg .= "\n";
         foreach my $var (@cookievars) {          foreach my $var (@cookievars) {
             $supportmsg .= "$var: $cookies{$var}\n";              $supportmsg .= "$var: $cookies{$var}\n";
Line 775  sub print_header { Line 801  sub print_header {
     $r->print(<<END);      $r->print(<<END);
 <table width="620" border="0" cellspacing="0" cellpadding="0" height="55">   <tr height="50">    <td width='5'>&nbsp;</td>  <table width="620" border="0" cellspacing="0" cellpadding="0" height="55">   <tr height="50">    <td width='5'>&nbsp;</td>
    <td>     <td>
     <fieldset><legend><img src="$location/lonIcons/minilogo.gif" height='20' width='29' valign='bottom' />&nbsp;&nbsp;<b><font size="+1">LON-CAPA $lt{'headline'}</font></b></legend>      <fieldset>
         <legend>
           <img src="$location/lonIcons/minilogo.gif" height="20" width="29" valign="bottom" />
           LON-CAPA $lt{'headline'}
         </legend>
  <table id="LC_helpmenu_links">   <table id="LC_helpmenu_links">
    <tr>     <tr>
     <td align="center"><span class="LC_nobreak"><img src="$location/help/help.png" border="0" alt="($lt{'login'})" valign="middle" />&nbsp;<b><a href="/adm/loginproblems.html">$lt{'login'}</a></b>&nbsp;</span></td>      <td align="center"><span class="LC_nobreak"><img src="$location/help/help.png" border="0" alt="($lt{'login'})" valign="middle" />&nbsp;<b><a href="/adm/loginproblems.html">$lt{'login'}</a></b>&nbsp;</span></td>

Removed from v.1.49  
changed lines
  Added in v.1.53


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>