Diff for /loncom/interface/lonpreferences.pm between versions 1.96 and 1.98

version 1.96, 2007/01/23 04:09:03 version 1.98, 2007/04/13 13:39:32
Line 516  ENDVCSCREEN Line 516  ENDVCSCREEN
 }  }
   
 ################################################################  ################################################################
   #                     Icon Subroutines                         #
   ################################################################
   sub iconchanger {
       my $r = shift;
       my $user       = $env{'user.name'};
       my $domain     = $env{'user.domain'};
       my %userenv = &Apache::lonnet::get
           ('environment',['icons']);
       my $iconic='checked="checked"';
       my $classic='';
       if ($userenv{'icons'} eq 'classic') {
          $classic='checked="checked"';
          $iconic='';
       }
       my $useicons=&mt('Use icons');
       my $usebuttons=&mt('Use classic buttons');
       my $change=&mt('Change');
       $r->print(<<ENDSCREEN);
   <form name="prefs" action="/adm/preferences" method="post">
   <input type="hidden" name="action" value="verify_and_change_icons" />
   <label><input type="radio" name="menumode" value="iconic" $iconic /> $useicons</label><br />
   <label><input type="radio" name="menumode" value="classic" $classic /> $usebuttons</label><br />
   <input type="submit" value="$change" />
   </form>
   ENDSCREEN
   }
   
   sub verify_and_change_icons {
       my $r = shift;
       my $user       = $env{'user.name'};
       my $domain     = $env{'user.domain'};
       my $newicons  = $env{'form.menumode'};
   
       &Apache::lonnet::put('environment',{'icons' => $newicons});
       &Apache::lonnet::appenv('environment.icons' => $newicons);
       $r->print(&mt('Set menu mode to [_1].',$newicons));
   }
   
   ################################################################
 #         Message Forward                                      #  #         Message Forward                                      #
 ################################################################  ################################################################
   
Line 852  sub client_form { Line 891  sub client_form {
     if ($caller eq 'reset_by_email') {      if ($caller eq 'reset_by_email') {
         $output .= qq|          $output .= qq|
 <tr><td align="right"> E-mail address:                        </td>  <tr><td align="right"> E-mail address:                        </td>
     <td><input type="text" name="email" size="15" /> </td></tr>      <td><input type="text" name="email" size="30" /> </td></tr>
 <tr><td align="right"> Username:                        </td>  <tr><td align="right"> Username:                        </td>
     <td>      <td>
      <input type="text" name="uname" size="10" />       <input type="text" name="uname" size="15" />
      <input type="hidden" name="currentpass" value="$currentpass" />       <input type="hidden" name="currentpass" value="$currentpass" />
     </td></tr>      </td></tr>
 <tr><td align="right"> Domain:                               </td>  <tr><td align="right"> Domain:                               </td>
Line 1340  sub handler { Line 1379  sub handler {
                       }));                        }));
   
     push (@Options,({ action   => 'changemsgforward',      push (@Options,({ action   => 'changemsgforward',
                       linktext => 'Change Message Forwarding and Notification Addresses',                        linktext => 'Change Message Forwarding and Notification Email Addresses',
                       href     => '/adm/preferences',                        href     => '/adm/preferences',
                       help     => 'Prefs_Forwarding',                        help     => 'Prefs_Forwarding',
                       breadcrumb =>                         breadcrumb => 
Line 1470  sub handler { Line 1509  sub handler {
       }));        }));
     }      }
   
       push (@Options,({ action   => 'changeicons',
                         linktext => 'Change How Main Menu is Displayed',
                         href     => '/adm/preferences',
                         subroutine => \&iconchanger,
                         breadcrumb =>
                             { href => '/adm/preferences?action=changeicons',
                               text => 'Change Main Menu'},
                         },
                       { action   => 'verify_and_change_icons',
                         subroutine => \&verify_and_change_icons,
                         breadcrumb =>
                             { href => '/adm/preferences?action=changeicons',
                               text => 'Change Main Menu'},
                         printmenu => 'yes',
                         }));
   
     if (&Apache::lonnet::allowed('whn',$env{'request.course.id'})      if (&Apache::lonnet::allowed('whn',$env{'request.course.id'})
  || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/'   || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/'
     .$env{'request.course.sec'})) {      .$env{'request.course.sec'})) {

Removed from v.1.96  
changed lines
  Added in v.1.98


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