Diff for /loncom/interface/lonpreferences.pm between versions 1.196.4.11 and 1.207

version 1.196.4.11, 2013/06/10 20:28:12 version 1.207, 2013/07/15 16:13:21
Line 211  sub texenginechanger { Line 211  sub texenginechanger {
      'tth' => 'tth (TeX to HTML)',       'tth' => 'tth (TeX to HTML)',
      #'ttm' => 'TeX to MathML',       #'ttm' => 'TeX to MathML',
      'jsMath' => 'jsMath',       'jsMath' => 'jsMath',
                      'MathJax' => 'MathJax',       'MathJax' => 'MathJax',
      'mimetex' => 'mimetex (Convert to Images)',       'mimetex' => 'mimetex (Convert to Images)',
                      'raw' => 'Raw (Screen Reader)'                       'raw' => 'Raw (Screen Reader)'
                      );                       );
Line 354  sub rolesprefchanger { Line 354  sub rolesprefchanger {
     my $hotlist_n=$userenv{'recentrolesn'};      my $hotlist_n=$userenv{'recentrolesn'};
     my ($checkedon,$checkedoff);      my ($checkedon,$checkedoff);
     if ($hotlist_flag) {      if ($hotlist_flag) {
         $checkedon = 'checked="checked"';    $checkedon = 'checked="checked"';
     } else {      } else {
         $checkedoff = 'checked="checked"';          $checkedoff = 'checked="checked"';
     }      }
Line 437  $options.' Line 437  $options.'
 &Apache::lonhtmlcommon::row_closure(1).  &Apache::lonhtmlcommon::row_closure(1).
 &Apache::lonhtmlcommon::end_pick_box().'  &Apache::lonhtmlcommon::end_pick_box().'
 </div>');  </div>');
     if ($roles_check_list) {      if ($roles_check_list) { 
         $r->print('<div class="LC_left_float">          $r->print('<div class="LC_left_float">
 <h4>'.&mt('Freeze Roles').'</h4>  <h4>'.&mt('Freeze Roles').'</h4>
 <p>'.&mt('The table below can be used to [_1]freeze[_2] '.$lc_role.'s in the Hotlist.','<q>','</q>').'<br />'.  <p>'.&mt('The table below can be used to [_1]freeze[_2] '.$lc_role.'s in the Hotlist.','<q>','</q>').'<br />'.
Line 988  ENDMSG Line 988  ENDMSG
                    '" onclick="javscript:delete_address('."'$num'".')" />'.                     '" onclick="javscript:delete_address('."'$num'".')" />'.
                    &mt('Delete').'</label></span></td>'.                     &mt('Delete').'</label></span></td>'.
                    '<td><input type="text" value="'.$item.'" name="address_'.                     '<td><input type="text" value="'.$item.'" name="address_'.
                    $num.'" onFocus="javascript:address_changes('."'$num'".                     $num.'" onfocus="javascript:address_changes('."'$num'".
                    ')" /></td><td>';                     ')" /></td><td>';
         my %chk;          my %chk;
         if (defined($allnot{$item}{'crit'})) {          if (defined($allnot{$item}{'crit'})) {
Line 1037  ENDMSG Line 1037  ENDMSG
                '<input type="checkbox" name="add_notify_'.$num.                 '<input type="checkbox" name="add_notify_'.$num.
                '" value="1" />'.&mt('Add new address').'</label></span></td>'.                 '" value="1" />'.&mt('Add new address').'</label></span></td>'.
                '<td><input type="text" value="" name="address_'.$num.                 '<td><input type="text" value="" name="address_'.$num.
                '" onFocus="javascript:new_address('."'$num'".')" /></td><td>';                 '" onfocus="javascript:new_address('."'$num'".')" /></td><td>';
     foreach my $type ('all','crit','reg') {      foreach my $type ('all','crit','reg') {
         $output .= '<span class="LC_nobreak"><label>'.          $output .= '<span class="LC_nobreak"><label>'.
                    '<input type="radio" name="notify_type_'.$num.                     '<input type="radio" name="notify_type_'.$num.
Line 1211  sub colorschanger { Line 1211  sub colorschanger {
     foreach my $item (sort(keys(%colortypes))) {      foreach my $item (sort(keys(%colortypes))) {
        my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain);         my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain);
        $chtable.=&Apache::loncommon::start_data_table_row().         $chtable.=&Apache::loncommon::start_data_table_row().
                  '<td>'.$colortypes{$item}.'<td><input name="'.$item.     '<td>'.$colortypes{$item}.'<td><input name="'.$item.
                  '" class="colorchooser"  size="10" value="'.$curcol.          '" class="colorchooser"  size="10" value="'.$curcol.
                  '" /></td>'.  '" /></td>'.
          &Apache::loncommon::end_data_table_row()."\n";      &Apache::loncommon::end_data_table_row()."\n";
     }      }
     my $end_data_table = &Apache::loncommon::end_data_table();      my $end_data_table = &Apache::loncommon::end_data_table();
     my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();      my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
Line 1226  sub colorschanger { Line 1226  sub colorschanger {
 ' . $colorchooser . '  ' . $colorchooser . '
 </script>  </script>
 ');  ');
   
     $r->print(<<ENDCOL);      $r->print(<<ENDCOL);
   
 <form name="parmform">  <form name="parmform" action="">
 <input type="hidden" name="pres_marker" />  <input type="hidden" name="pres_marker" />
 <input type="hidden" name="pres_type" />  <input type="hidden" name="pres_type" />
 <input type="hidden" name="pres_value" />  <input type="hidden" name="pres_value" />
Line 1267  sub verify_and_change_colors { Line 1266  sub verify_and_change_colors {
     my $message='';      my $message='';
     foreach my $item (keys %colortypes) {      foreach my $item (keys %colortypes) {
         my $color=$env{'form.'.$item};          my $color=$env{'form.'.$item};
         if (!($color =~ /^#/)) {   if (!($color =~ /^#/)) {
             $color = '#' . $color;      $color = '#' . $color;
         }   }
         my $entry='color.'.$function.'.'.$item;          my $entry='color.'.$function.'.'.$item;
  if (($color=~/^\#[0-9A-Fa-f]{6}$/) && (!$env{'form.resetall'})) {   if (($color=~/^\#[0-9A-Fa-f]{6}$/) && (!$env{'form.resetall'})) {
     &Apache::lonnet::put('environment',{$entry => $color});      &Apache::lonnet::put('environment',{$entry => $color});
Line 1320  sub passwordchanger { Line 1319  sub passwordchanger {
                 $r->print(                  $r->print(
                     '<p class="LC_warning">'                      '<p class="LC_warning">'
                    .&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'                     .&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'
                              ,'<a href="/adm/resetpw">','</a>')                         ,'<a href="/adm/resetpw">','</a>')
                    .'</p>'                     .'</p>'
                 );                  );
                 return;                  return;
Line 1341  sub passwordchanger { Line 1340  sub passwordchanger {
                 }                  }
             } else {              } else {
                 $r->print(                  $r->print(
                    '<p class="LC_warning">'                      '<p class="LC_warning">'
                   .&mt('Sorry, the URL generated when you requested reset of'                     .&mt('Sorry, the URL generated when you requested reset of'
                       .' your password contained incomplete information.')                         .' your password contained incomplete information.')
                    .'</p>'                     .'</p>'
                 );                  );
                 return;                  return;
Line 1459  sub client_form { Line 1458  sub client_form {
                 'changepass' => 'Save',                  'changepass' => 'Save',
     );      );
   
     my $output = '<form name="client">'      my $output = '<form name="client" action="">'
                 .&Apache::lonhtmlcommon::start_pick_box();                  .&Apache::lonhtmlcommon::start_pick_box();
     if ($caller eq 'reset_by_email') {      if ($caller eq 'reset_by_email') {
         $output .= &Apache::lonhtmlcommon::row_title(          $output .= &Apache::lonhtmlcommon::row_title(
Line 1490  sub client_form { Line 1489  sub client_form {
               .'<input type="password" name="newpass_2" size="10" />'                .'<input type="password" name="newpass_2" size="10" />'
               .&Apache::lonhtmlcommon::row_closure(1)                .&Apache::lonhtmlcommon::row_closure(1)
               .&Apache::lonhtmlcommon::end_pick_box();                .&Apache::lonhtmlcommon::end_pick_box();
     $output .= '<p><input type="button" value="'.$lt{'changepass'}.'" onClick="send();" /></p>'      $output .= '<p><input type="button" value="'.$lt{'changepass'}.'" onclick="send();" /></p>'
               .qq|                .qq|
 <input type="hidden" name="ukey_cpass"  value="$hexkey->{'ukey_cpass'}" />  <input type="hidden" name="ukey_cpass"  value="$hexkey->{'ukey_cpass'}" />
 <input type="hidden" name="lkey_cpass"  value="$hexkey->{'lkey_cpass'}" />  <input type="hidden" name="lkey_cpass"  value="$hexkey->{'lkey_cpass'}" />
Line 2126  push(@{ $menu[0]->{items} }, { Line 2125  push(@{ $menu[0]->{items} }, {
  linktitle => 'Change your password.',   linktitle => 'Change your password.',
  });   });
     }      }
     if ($env{'environment.remote'} eq 'off') {  
 push(@{ $menu[1]->{items} }, {  
         linktext => 'Launch Remote Control',  
         url => '/adm/remote?url=/adm/preferences&amp;action=launch',  
         permission => 'F',  
         #help => '',  
         icon => 'remotecontrol.png',  
         linktitle => 'Launch the remote control for LON-CAPA.',  
         });  
     }else{  
 push(@{ $menu[1]->{items} }, {  
         linktext => 'Collapse Remote Control',  
         url => '/adm/remote?url=/adm/preferences&amp;action=collapse',  
         permission => 'F',  
         #help => '',  
         icon => 'remotecontrol.png',  
         linktitle => 'Collapse the remote control for LON-CAPA.',  
         });  
     }  
   
     if (&can_toggle_namelocking()) {      if (&can_toggle_namelocking()) {
         push(@{ $menu[0]->{items} }, {          push(@{ $menu[0]->{items} }, {
Line 2226  sub handler { Line 2206  sub handler {
     } else {      } else {
         $brlink ='/adm/preferences';          $brlink ='/adm/preferences';
         $brtxt = 'Set User Preferences';          $brtxt = 'Set User Preferences';
         $brhelp = 'Prefs_About_Me,Prefs_Language,Prefs_Screen_Name_Nickname,Change_Colors,Change_Password,Prefs_Messages,Change_Discussion_Display';          $brhelp = 'Prefs_About_Me,Prefs_Language,Prefs_Screen_Name_Nickname,Change_Colors,Change_Password,Prefs_Messages,Change_Discussion_Display';   
     }      }
     Apache::lonhtmlcommon::add_breadcrumb      Apache::lonhtmlcommon::add_breadcrumb
         ({href => $brlink,          ({href => $brlink,

Removed from v.1.196.4.11  
changed lines
  Added in v.1.207


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