Diff for /loncom/interface/lonsupportreq.pm between versions 1.79 and 1.79.2.1

version 1.79, 2015/06/09 21:22:57 version 1.79.2.1, 2016/08/12 18:23:32
Line 84  sub print_request_form { Line 84  sub print_request_form {
     my ($r,$origurl,$function) = @_;      my ($r,$origurl,$function) = @_;
     my ($os,$browser,$bversion,$uhost,$uname,$udom,$uhome,$urole,$usec,$email,$cid,      my ($os,$browser,$bversion,$uhost,$uname,$udom,$uhome,$urole,$usec,$email,$cid,
         $cdom,$cnum,$ctitle,$ccode,$sectionlist,$lastname,$firstname,$server,          $cdom,$cnum,$ctitle,$ccode,$sectionlist,$lastname,$firstname,$server,
         $formname,$public,$homeserver);          $formname,$public,$homeserver,$knownuser,$captcha_form,$captcha_error,
           $captcha,$recaptcha_version);
     $function = &Apache::loncommon::get_users_function() if (!$function);      $function = &Apache::loncommon::get_users_function() if (!$function);
     $ccode = '';      $ccode = '';
     $os = $env{'browser.os'};      $os = $env{'browser.os'};
Line 105  sub print_request_form { Line 106  sub print_request_form {
             }              }
         }          }
     }      }
       if (($env{'user.name'} =~ /^$match_username$/) &&
           ($env{'user.domain'} =~ /^$match_domain$/) && (!$public)) {
           $knownuser = 1;
       } else {
           my $lonhost = $r->dir_config('lonHostID');
           ($captcha_form,$captcha_error,$captcha,$recaptcha_version) =
               &Apache::loncommon::captcha_display('login',$lonhost);
       }
     if ($homeserver) {      if ($homeserver) {
         $uhome = $env{'user.home'};          $uhome = $env{'user.home'};
         $urole = $env{'request.role'};          $urole = $env{'request.role'};
Line 276  $loaditems Line 285  $loaditems
 // ]]>  // ]]>
 </script>  </script>
 ENDJS  ENDJS
       if ($recaptcha_version >=2) {
           $js.= "\n".'<script src="https://www.google.com/recaptcha/api.js"></script>'."\n";
       }
     my %add_entries = (      my %add_entries = (
                        style    => "margin-top:0px;margin-bottom:0px;",                         style    => "margin-top:0px;margin-bottom:0px;",
                        onload   => "initialize_codes();",                         onload   => "initialize_codes();",
Line 329  ENDJS Line 341  ENDJS
                &Apache::lonhtmlcommon::row_closure();                 &Apache::lonhtmlcommon::row_closure();
     $num ++;      $num ++;
     $i = $num%2;      $i = $num%2;
     if (($env{'user.name'} =~ /^$match_username$/) && (!$public)) {      if ($knownuser) {
         if ($homeserver) {           if ($homeserver) { 
             $output .= &Apache::lonhtmlcommon::row_title($html_lt{'emac'},undef,$css[$i]).              $output .= &Apache::lonhtmlcommon::row_title($html_lt{'emac'},undef,$css[$i]).
                        '<input type="text" size="50" name="cc" value="" /><br />'."\n".                         '<input type="text" size="50" name="cc" value="" /><br />'."\n".
Line 343  ENDJS Line 355  ENDJS
                      &HTML::Entities::encode($udom,'"<>&').'" />'."\n";                       &HTML::Entities::encode($udom,'"<>&').'" />'."\n";
     my $uname_input = '<input type="hidden" name="uname" value="'.      my $uname_input = '<input type="hidden" name="uname" value="'.
                       &HTML::Entities::encode($uname,'"<>&').'" />'."\n";                         &HTML::Entities::encode($uname,'"<>&').'" />'."\n"; 
     if (($env{'user.name'} =~ /^$match_username$/) &&       if ($knownuser) {
         ($env{'user.domain'} =~ /^$match_domain$/) && (!$public)) {  
         $output .= '<i>'.$html_lt{'unme'}.'</i>:&nbsp;'.$uname.'&nbsp;&nbsp;<i>'.$html_lt{'doma'}.'</i>:&nbsp;'.$udom.$udom_input.$uname_input;          $output .= '<i>'.$html_lt{'unme'}.'</i>:&nbsp;'.$uname.'&nbsp;&nbsp;<i>'.$html_lt{'doma'}.'</i>:&nbsp;'.$udom.$udom_input.$uname_input;
     } else {      } else {
         my $udomform = '';          my $udomform = '';
Line 504  ENDJS Line 515  ENDJS
                &Apache::lonhtmlcommon::row_closure();                 &Apache::lonhtmlcommon::row_closure();
     $num ++;      $num ++;
     $i = $num%2;       $i = $num%2; 
     if (($env{'user.name'} =~ /^$match_username$/) && (!$public)) {      if ($knownuser) {
         if ($homeserver) {          if ($homeserver) {
             $output .= &Apache::lonhtmlcommon::row_title($html_lt{'opfi'},undef,$css[$i]).              $output .= &Apache::lonhtmlcommon::row_title($html_lt{'opfi'},undef,$css[$i]).
                        ' <input type="file" name="screenshot" size="20" /><br />'.                         ' <input type="file" name="screenshot" size="20" /><br />'.
Line 514  ENDJS Line 525  ENDJS
             $i = $num%2;              $i = $num%2;
         }          }
     } else {      } else {
         my $lonhost = $r->dir_config('lonHostID');          if ($captcha_form) {
         my ($captchaform,$error) =   
             &Apache::loncommon::captcha_display('login',$lonhost);  
         if ($captchaform) {  
             $output .= &Apache::lonhtmlcommon::row_title(              $output .= &Apache::lonhtmlcommon::row_title(
                            '<span title="'.&mt('required').'">'.                             '<span title="'.&mt('required').'">'.
                            &mt('Validation').                             &mt('Validation').
                            ' <span class="LC_info">*</span></span>'                             ' <span class="LC_info">*</span></span>'
                       ,undef,$css[$i]).                        ,undef,$css[$i]).
                        $captchaform."\n".                         $captcha_form."\n".
                        &Apache::lonhtmlcommon::row_closure();                         &Apache::lonhtmlcommon::row_closure();
             $num ++;              $num ++;
             $i = $num%2;              $i = $num%2;

Removed from v.1.79  
changed lines
  Added in v.1.79.2.1


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