Diff for /loncom/interface/loncommon.pm between versions 1.164 and 1.165

version 1.164, 2003/12/26 21:17:37 version 1.165, 2003/12/27 23:55:10
Line 1010  END Line 1010  END
         $Javascript_toUpperCase = "";          $Javascript_toUpperCase = "";
     }      }
   
       my $radioval = "'nochange'";
       my $argfield = 'null';
       if ( grep/^mode$/,(keys %in) ) {
           if ($in{'mode'} eq 'modifycourse')  {
               if ( grep/^curr_authtype$/,(keys %in) ) {
                   $radioval = "'$in{'curr_authtype'}'";
               }
               if ( grep/^curr_autharg$/,(keys %in) ) {
                   unless ($in{'curr_autharg'} eq '') {
                       $argfield = "'$in{'curr_autharg'}'";
                   }
               }
           }
       }
   
     $result.=<<"END";      $result.=<<"END";
 var current = new Object();  var current = new Object();
 current.radiovalue = 'nochange';  current.radiovalue = $radioval;
 current.argfield = null;  current.argfield = $argfield;
   
 function changed_radio(choice,currentform) {  function changed_radio(choice,currentform) {
     var choicearg = choice + 'arg';      var choicearg = choice + 'arg';
Line 1100  sub authform_kerberos{ Line 1115  sub authform_kerberos{
               kerb_def_auth => 'krb4',                kerb_def_auth => 'krb4',
               @_,                @_,
               );                );
     my ($check4,$check5);      my ($check4,$check5,$krbarg);
     if ($in{'kerb_def_auth'} eq 'krb5') {      if ($in{'kerb_def_auth'} eq 'krb5') {
        $check5 = " checked=\"on\"";         $check5 = " checked=\"on\"";
     } else {      } else {
        $check4 = " checked=\"on\"";         $check4 = " checked=\"on\"";
     }      }
       $krbarg = $in{'kerb_def_dom'};
   
       my $krbcheck = "";
       if ( grep/^curr_authtype$/,(keys %in) ) {
           if ($in{'curr_authtype'} =~ m/^krb/) {
               $krbcheck = " checked=\"on\"";
               if ( grep/^curr_autharg$/,(keys %in) ) {
                   $krbarg = $in{'curr_autharg'};
               }
           }
       }
   
     my $jscall = "javascript:changed_radio('krb',$in{'formname'});";      my $jscall = "javascript:changed_radio('krb',$in{'formname'});";
     my $result .= &mt      my $result .= &mt
         ('[_1] Kerberos authenticated with domain [_2] '.          ('[_1] Kerberos authenticated with domain [_2] '.
          '[_3] Version 4 [_4] Version 5',           '[_3] Version 4 [_4] Version 5',
          '<input type="radio" name="login" value="krb" '.           '<input type="radio" name="login" value="krb" '.
              'onclick="'.$jscall.'" onchange="'.$jscall.'" />',               'onclick="'.$jscall.'" onchange="'.$jscall.'"'.$krbcheck.' />',
          '<input type="text" size="10" name="krbarg" '.           '<input type="text" size="10" name="krbarg" '.
              'value="'.$in{'kerb_def_dom'}.'" '.               'value="'.$krbarg.'" '.
              'onchange="'.$jscall.'" />',               'onchange="'.$jscall.'" />',
          '<input type="radio" name="krbver" value="4" '.$check4.' />',           '<input type="radio" name="krbver" value="4" '.$check4.' />',
          '<input type="radio" name="krbver" value="5" '.$check5.' />');           '<input type="radio" name="krbver" value="5" '.$check5.' />');
Line 1126  sub authform_internal{ Line 1153  sub authform_internal{
                 kerb_def_dom => 'MSU.EDU',                  kerb_def_dom => 'MSU.EDU',
                 @_,                  @_,
                 );                  );
   
       my $intcheck = "";
       my $intarg = 'value=""';
       if ( grep/^curr_authtype$/,(keys %args) ) {
           if ($args{'curr_authtype'} eq 'int') {
               $intcheck = " checked=\"on\"";
               if ( grep/^curr_autharg$/,(keys %args) ) {
                   $intarg = "value=\"$args{'curr_autharg'}\"";
               }
           }
       }
   
     my $jscall = "javascript:changed_radio('int',$args{'formname'});";      my $jscall = "javascript:changed_radio('int',$args{'formname'});";
     my $result.=&mt      my $result.=&mt
         ('[_1] Internally authenticated (with initial password [_2])',          ('[_1] Internally authenticated (with initial password [_2])',
          '<input type="radio" name="login" value="int" '.           '<input type="radio" name="login" value="int" '.$intcheck.
              'onchange="'.$jscall.'" onclick="'.$jscall.'" />',               ' onchange="'.$jscall.'" onclick="'.$jscall.'" />',
          '<input type="text" size="10" name="intarg" value="" '.           '<input type="text" size="10" name="intarg" '.$intarg.
              'onchange="'.$jscall.'" />');               ' onchange="'.$jscall.'" />');
     return $result;      return $result;
 }  }
   
Line 1142  sub authform_local{ Line 1181  sub authform_local{
               kerb_def_dom => 'MSU.EDU',                kerb_def_dom => 'MSU.EDU',
               @_,                @_,
               );                );
   
       my $loccheck = "";
       my $locarg = 'value=""';
       if ( grep/^curr_authtype$/,(keys %in) ) {
           if ($in{'curr_authtype'} eq 'loc') {
               $loccheck = " checked=\"on\"";
               if ( grep/^curr_autharg$/,(keys %in) ) {
                   $locarg = "value=\"$in{'curr_autharg'}\"";
               }
           }
       }
   
     my $jscall = "javascript:changed_radio('loc',$in{'formname'});";      my $jscall = "javascript:changed_radio('loc',$in{'formname'});";
     my $result.=&mt('[_1] Local Authentication with argument [_2]',      my $result.=&mt('[_1] Local Authentication with argument [_2]',
                     '<input type="radio" name="login" value="loc" '.                      '<input type="radio" name="login" value="loc" '.$loccheck.
                         'onchange="'.$jscall.'" onclick="'.$jscall.'" />',                          ' onchange="'.$jscall.'" onclick="'.$jscall.'" />',
                     '<input type="text" size="10" name="locarg" value="" '.                      '<input type="text" size="10" name="locarg" '.$locarg.
                         'onchange="'.$jscall.'" />');                          ' onchange="'.$jscall.'" />');
     return $result;      return $result;
 }  }
   

Removed from v.1.164  
changed lines
  Added in v.1.165


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